Started by
softmushroombaby
on
Topic category: Help with Minecraft modding (Java Edition)
I have an item that I want to become a block when I right-click on a block
the problem with this code is that
- It strictly puts the block on TOP of the block, not the sides or bottom
- it deletes the block on top of the block I right-clicked.
Procedure I'm using: https://imgur.com/a/VcEE6ON
2 things and 1 solution for a problem,
thing 1:
do you want to make it a placeable item that is a block when you place it?
(like stone,wood,etc)
thing 2:
what do you want thing block to do, like does it just sit next to the other block or does it beat the friggin ender dragon 2318219 times
solution 1:
place x: x, y, *Y + 1*, z: z
do you see the y + 1, that means its going to be placed 1 block above, if i had a stone block that i wanted to place where my player is, i wouldnt do y+1, I would do y, bc y + 1 would be my player head, y = vertical axis, x = horizantal axis, z = depth axis(?), if you want to change its horizonatal values, change x and z, not y
i simply want to use it like a regular block, yes! it just has a different on-hand texture, and this item is also drinkable!
I don't understand the solution, as I simply want the block to be peaceable, not to be placed where the player is, nor do I just want the block to be strictly horizontal or vertical
I know this is a late reply but I was having the same issue as you. After tinkering around for a bit I found a solution for placing a block with an item.
The diamond block represents the block you want placed and the diamond represents the item you are using to place the block.
Procedure: https://imgur.com/a/ABuagLe
I didn't do it in the image but if you want to add an if player is NOT in creative mode to the remove one item from player inventory so it doesn't take away the item in creative mode.
You can replace the is block at X Y Z air with the blocks you only want it to be placed on if that's what you want to do. I still haven't figured out how to place a block on replaceables like short grass, so if you find out please let me know.