How to place block using item in player's inventory #2253
Unanswered
xieleo5
asked this question in
Mod Dev Support
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I tried to make a mod that takes, for example, the name of block as input. And then search the player's inventory to found the block and place the block to where the player is aimming at. I tried to use BlockItem.place() function. However when I click on the block in survival mod, it just break. Also when I click on the empty slot in inventory where the block used to be in, the block just suddenly came back. Anyone knows why this happen?
Here is my code:
Beta Was this translation helpful? Give feedback.
All reactions