Started by
Alexia_74
on
Topic category: Help with Minecraft modding (Java Edition)
Hello I made little procedure to get pebbles when right clicking on grass block. I tryed it and it work, exept I can right click any block and it will give me pebbles.
here my code:
In reality i have a second issue i don't really want right click on vanilla grass block but i need to right click on Terrafirmacraft grass block (any grass block if possible)
Thank in advance if someone can help me for that.
You can use "if is block at x y z tagged in (tag)" condition to make sure that it is a grass block, you can replace (tag) with any tag for a block, I think if you click on one of the buttons at the top of the screen it will pull up a list of common tags, including a grass one.
thank you I tryed with "if condition" but now my game crash when i use right click on a grass.
I did that
And I got this error when my game crash:
The game crashed whilst unexpected error
Error: net.minecraft.ResourceLocationException: Non [a-z0-9_.-] character in namespace of location: #tfc:grass
I just tryed with "tagged in block as": tfc:grass game doesnt crash when right click but don't give pebbles
how to edit the code: click the left button on the procedure, it lights up but it does not open, then on the left side 4 options under the plus sign to add, we have to edit the code of the selected element, we click on it and open it, then we search The emitter block in this case would be grass (note that grass is not the same as ground with grass) and we change it by hand writing the TF block.
Then we do the same with the receiver, that is, in pebble, we change the name of the minecraft block to that of TF and click save code, you have the option at the top and it would be compatible with TF without any problem.
Sorry I took so long to respond. you can use the procedure I have written below without needing custom code, I have tested it and it will work. Different procedure blocks are marked as (block(sub-block) [configurable sub-part])
"(If(Is (get block at (x) (y) (z)) material type [grass])
do (spawn item/gem (pebble) at (x) (y) (z))"
I realized that there is no grass tag in vanilla minecraft or forge. I thought I remembered one being there, but I still should have checked.