#Custom item function details

1 messages · Page 1 of 1 (latest)

brazen hill
#

So I have a custom item that has the food and consumable components so that I can use an advancement to detect when it's used. A couple things I was wondering.

  • Is there a way to interrupt the animation? I like it but kinda want it to end after a second or so.
  • Is there a way to stop the player being slowed while using it?
  • Can you make it unconsumable or is best practice just to set the consume seconds super high?
uncut pawn
#
  1. not really, you could clear the item and give it back instantly, that should reset the holding RClick but I’m not sure if that’s what you want - and the player can just press rclick again…
  2. in the last two snapshots that is possible, in current release it’s not. In 1.21.10 is no way to remove the slowdown
  3. super high consumable seconds

Also - you don’t need the food components if it’s not actually a food, that just tells how much food/saturation to give and has nothing to do with using/consuming the item

brazen hill
uncut pawn
#
  1. they added a component to control exactly that ^^ for the spear

do I need can always eat
No

brazen hill
#

Sweet, Thanks!

brazen hill
uncut pawn
#

You probably need to replace with air and then place the item back (within the same tick, so just two lines after each other in a function)

#

So it’s not that straightforward

brazen hill
#

I gothca, yeah it doesn't seem to actually interrupt the holding of right click. thats ok