Package info.u_team.u_team_core.api.item
Schnittstelle UItemExtension
- Alle bekannten Implementierungsklassen:
UItem
public interface UItemExtension
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungdefault booleancanBeDropped(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.player.Player player) Should the player be able to drop this item?default booleanshouldPlayUpdateAnimation(net.minecraft.world.item.ItemStack oldStack, net.minecraft.world.item.ItemStack newStack) Should play update animations when e.g. switching item slots or updating stacksdefault booleanupdateItemEntity(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.item.ItemEntity entity) Called when the item is dropped in the world as anItemEntity
-
Methodendetails
-
shouldPlayUpdateAnimation
default boolean shouldPlayUpdateAnimation(net.minecraft.world.item.ItemStack oldStack, net.minecraft.world.item.ItemStack newStack) Should play update animations when e.g. switching item slots or updating stacks- Parameter:
oldStack- Old stacknewStack- New stack- Gibt zurück:
- Return true to update
-
canBeDropped
default boolean canBeDropped(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.player.Player player) Should the player be able to drop this item?- Parameter:
stack- Stackplayer- Player- Gibt zurück:
- Return true to allow drops
-
updateItemEntity
default boolean updateItemEntity(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.item.ItemEntity entity) Called when the item is dropped in the world as anItemEntity- Parameter:
stack- Stackentity- ItemEntity that holds this stack- Gibt zurück:
- Return true to skip the default tick logic, false otherwise
-