how to simulate a right click on a block? #3228
Replies: 1 comment
-
ok nvm im stupid |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
i want to simulate a right click on a block. i tried doing
new AxeItem(constructor params).useOnBlock(ctx);
but that errored, saying that the registry is already frozen (which makes sense, as i was registering an item at the wrong time).i think i can use ItemStack.useOnBlock, but idk how to get an ItemStack instance.
i also dont want to just copy and paste the code from AxeItem.useOnBlock, as that might be distributing code, and STRIPPED_BLOCKS is protected.
Beta Was this translation helpful? Give feedback.
All reactions