Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/22/21 in all areas

  1. Please post your code, so that I can see what might be causing this (I won't be able to respond until tomorrow, though, since I need to sleep now). I've never done this before, so my knowledge is limited. Here is a link to the documentation on the topic, though, which seems fairly straightforward.
    1 point
  2. Within Item#use, you should call PlayerEntity#startUsingItem. This will start using the item when the item is used. You can set the maximum number of ticks that the item can be used for with the return value of Item#getUseDuration. While the item is being used, Item#onUseTick will be called every tick, and its integer parameter is the number of ticks left in the use duration. This is probably where you want to put your logic, since you mentioned that the player should be able to keep holding the item to keep the process going. At some point, the player will release the item, which calls Item#releaseUsing. Its integer parameter is the number of ticks that the item was used for, so you could also put some logic there.
    1 point
  3. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support. Also, common sense/and actually putting in effort by using the search feature of this site would answer your questions. That is the reason we lock old threads, because the questions have been answered a thousand times before during the supported lifecycle of that version.
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.