Started by
koyote
on
Topic category: Help with modding (Java Edition)
As the title says, I want to create a plant that can be eaten as food with the same item when it is placed and when it is dropped. For example, carrots and potatoes. To be more precise, I am trying to create new mushrooms that can be collected, eaten, and then repositioned.
Make an item with food properties. Then on right clicked on block trigger to place the crop or mushroom. Make the mushroom crop block seperately. You can add conditions to check whether the block is dirt or whatever to be able to place it. Then make the block drop the item.
I tried, but it only installs when you right click on the top face of the dirt block.
I assume when you say install you mean it gets placed. Then whats the problem, you want it to have rotation or something? It wont place on the side of a dirt block if your condition checks the block at y-1 and it isnt dirt etc.
So if you want rotation, make 6 options, to check what rotation the block is. Get the rotation of the block and then use that to either check block at x+1, z+1, x-1, z-1, y-1, y+1. If you dont know what north south east west relate to in terms of x and z axis: north-south is Z axis where south is positive and east-west is X axis where east is positive.
Sorry for the misunderstanding. I'm using a translation so the text is wrong. Correctly, I want the mushroom to be placed only when I right click on the top face of the block. As it is now, right clicking on the side of the block will also place the mushroom.
Do you have a conditional placement procedure in properties;
Return logic [Get block at x (y-1) z] is the same block as [dirt...etc...]