Started by
BonnieRobloxRIP
on
Topic category: Help with Minecraft modding (Java Edition)
The idea is that i want to make a custom block that can generate a specific item (for example diamonds) every 5 seconds and use it with a hopper to extract the generated diamonds to a chest. The block is capable of holding up to only 1 item at a time. like 1 slot with only 1 item count of anything...
I don't know how to do it and there's no such topic in the forum anywhere to my knowledge so it'll be nice if
someone can shed some light on how this can be done.
Make a procedure for the "Update tick", and open it. Create a local variable, call it time, and set the variable type to number. Make the blocks like this:
Set {Local variable: Time} to {{Get {Local variable: Time}} + {1}}
If {Get {Local variable: Time} = <Something>}:
Set {1} {Diamond item} in slot {0} of the currently open GUI of {Event/target entity}
Set {Local variable: Time} to {0}
Where I typed <Something>, you can enter the number of game ticks before it generates a diamond.
Here's an image of the procedure: wait a sec...
Oh wait! I wrote it wrong! Just a moment...
Make the blocks like this instead:
Set {Local variable: Time} to {{Get {Local variable: Time}} + {1}}
If {Get {Local variable: Time} = 100}:
Execute command /"data merge block ~ ~ ~ {Items:[{id:diamond,Slot:0,Count:1}]}" at x: {x} y: {y} z: {z}
Set {Local variable: Time} to {0}
Where I typed 100 I think that's equal to 5 seconds.
Here's an image of the procedure: https://ibb.co/ZW3hgMS
Oh, and you can type any minecraft item id after the "id:" insead of "diamond".
@krandris
I can't see the image of the procedures because it says connection is not private can you make another image that I can see?
Thanks, @MCREATORCODER6384