Started by
ccompound
on
Topic category: Help with Minecraft modding (Java Edition)
I don't know how do this cuz i suck w/ code and code blocks lol any help would be appreciated.
Topic category: Help with Minecraft modding (Java Edition)
I don't know how do this cuz i suck w/ code and code blocks lol any help would be appreciated.
I'm not quite sure about the beacon, but I can explain how to make an item transform when it enters the void. However, I'm not able to send a screenshot of the procedure.
Start the procedure by changing the green procedure start block to use the 'on entity tick update' global trigger.
Next, use an if block with the condition [not[is provided world client-side]] you will need to combine the 'not' block with the 'is provided world client-side' block
Next, another if block [is target entity (sub)type of item] to get this, you will need to take the blank 'is target entity (sub) type of...' block, and set it to item or item entity (I forgot how it shows up in the menu) by clicking on the lighter part of the procedure block to open the dropdown selection menu.
Then another if block, using the red = block from the logic tab, [[convert target entity to itemstack] = [the item to transform]] to select the item to transform, you will need the empty red square from the minecraft components tab, then click on the gray part to select an item.
Another if block to check if [[dimsenion ID of provided world] = [the end]] using the green equals block and minecraft component block to compare dimensions and select the end as a target.
Finally, one last if block to check if [[Y] < [0]] using blocks from the math tab. The = sign on the dark blue '=' block can be clicked to change it to the < sign.
Inside the last if block, you will want to put the procedure code to actually change the item.
What I did in a mod I recently worked on was to first check if there is a player within 120 blocks by using the 'does entity of type (type) exist within a square cube of size [120] centered on X: [X] Y: [60] Z: [Z]]
I then used a local itemstack variable and set it to the item I wanted to get from the conversion.
Next I set the size of the itemstack variable to the size of the [convert target entity to itemstack].
I then despawned the target entity and added the itemstack variable to the inventory of the nearest player within 120 blocks.
An alternative option would be to try to change the type of the itemstack of the target entity, then give it the levitation potion effect. But I'm not as sure of how the potion effect would work with the itemstack.
I know that this looks really complicated, but I have tried to explain the if block logic as much as possible.
Let me know if you need me to explain things more.
One final and important note about the procedure because it is set to run off of the global trigger 'on entity tick update' you don't need to specifically connect it to any procedure trigger from your custom item.