Interface CustomUseEffectsItem
- All Known Implementing Classes:
SandPaperItem
public interface CustomUseEffectsItem
-
Method Summary
Modifier and TypeMethodDescriptiondefault net.createmod.catnip.data.TriStateshouldTriggerUseEffects(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity) Called to determine if use effects should be applied for this item.booleantriggerUseEffects(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity, int count, net.minecraft.util.RandomSource random) Called when use effects should be applied for this item.
-
Method Details
-
shouldTriggerUseEffects
default net.createmod.catnip.data.TriState shouldTriggerUseEffects(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity) Called to determine if use effects should be applied for this item.- Parameters:
stack- The ItemStack being used.entity- The LivingEntity using the item.- Returns:
TriState.DEFAULTfor default behavior, orTriState.TRUE/TriState.FALSEto override default behavior
-
triggerUseEffects
boolean triggerUseEffects(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity, int count, net.minecraft.util.RandomSource random) Called when use effects should be applied for this item.- Parameters:
stack- The ItemStack being used.entity- The LivingEntity using the item.count- The amount of times effects should be applied. Can safely be ignored.random- The LivingEntity's RandomSource.- Returns:
- if the default behavior should be cancelled or not
-