Class SandPaperItem
java.lang.Object
net.minecraft.world.item.Item
com.simibubi.create.content.equipment.sandPaper.SandPaperItem
- All Implemented Interfaces:
CustomUseEffectsItem,net.minecraft.world.flag.FeatureElement,net.minecraft.world.level.ItemLike,net.neoforged.neoforge.common.extensions.IItemExtension
@ParametersAreNonnullByDefault
public class SandPaperItem
extends net.minecraft.world.item.Item
implements CustomUseEffectsItem
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.Item
net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item.TooltipContext -
Field Summary
Fields inherited from class net.minecraft.world.item.Item
ABSOLUTE_MAX_STACK_SIZE, BASE_ATTACK_DAMAGE_ID, BASE_ATTACK_SPEED_ID, BY_BLOCK, canRepair, DEFAULT_MAX_STACK_SIZE, MAX_BAR_WIDTHFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanPerformAction(net.minecraft.world.item.ItemStack stack, net.neoforged.neoforge.common.ItemAbility itemAbility) net.minecraft.world.item.ItemStackfinishUsingItem(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level level, net.minecraft.world.entity.LivingEntity entityLiving) net.minecraft.sounds.SoundEventintnet.minecraft.world.item.UseAnimgetUseAnimation(net.minecraft.world.item.ItemStack stack) intgetUseDuration(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity) voidinitializeClient(Consumer<net.neoforged.neoforge.client.extensions.common.IClientItemExtensions> consumer) voidreleaseUsing(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level worldIn, net.minecraft.world.entity.LivingEntity entityLiving, int timeLeft) 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.static voidspawnParticles(net.minecraft.world.phys.Vec3 location, net.minecraft.world.item.ItemStack polishedStack, net.minecraft.world.level.Level world) 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.net.minecraft.world.InteractionResultHolder<net.minecraft.world.item.ItemStack> use(net.minecraft.world.level.Level worldIn, net.minecraft.world.entity.player.Player playerIn, net.minecraft.world.InteractionHand handIn) net.minecraft.world.InteractionResultuseOn(net.minecraft.world.item.context.UseOnContext context) Methods inherited from class net.minecraft.world.item.Item
appendHoverText, asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canFitInsideContainerItems, components, getAttackDamageBonus, getBarColor, getBarWidth, getBreakingSound, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDefaultMaxStackSize, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getId, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getTooltipImage, hasCraftingRemainingItem, hurtEnemy, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isEnchantable, isFoil, isRepairable, isValidRepairItem, mineBlock, modifyDefaultComponentsFrom, onCraftedBy, onCraftedPostProcess, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, postHurtEnemy, requiredFeatures, toString, useOnRelease, verifyComponentsAfterLoadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabledMethods inherited from interface net.neoforged.neoforge.common.extensions.IItemExtension
applyEnchantments, canBeHurtBy, canContinueUsing, canDisableShield, canElytraFly, canEquip, canFitInsideContainerItems, canGrindstoneRepair, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultAttributeModifiers, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, isBookEnchantable, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, isPrimaryItemFor, makesPiglinsNeutral, onAnimalArmorTick, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onEntitySwing, onItemUseFirst, onLeftClickEntity, onStopUsing, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, supportsEnchantment
-
Constructor Details
-
SandPaperItem
public SandPaperItem(net.minecraft.world.item.Item.Properties properties)
-
-
Method Details
-
use
public net.minecraft.world.InteractionResultHolder<net.minecraft.world.item.ItemStack> use(net.minecraft.world.level.Level worldIn, net.minecraft.world.entity.player.Player playerIn, net.minecraft.world.InteractionHand handIn) - Overrides:
usein classnet.minecraft.world.item.Item
-
finishUsingItem
public net.minecraft.world.item.ItemStack finishUsingItem(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level level, net.minecraft.world.entity.LivingEntity entityLiving) - Overrides:
finishUsingItemin classnet.minecraft.world.item.Item
-
spawnParticles
public static void spawnParticles(net.minecraft.world.phys.Vec3 location, net.minecraft.world.item.ItemStack polishedStack, net.minecraft.world.level.Level world) -
releaseUsing
public void releaseUsing(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level worldIn, net.minecraft.world.entity.LivingEntity entityLiving, int timeLeft) - Overrides:
releaseUsingin classnet.minecraft.world.item.Item
-
useOn
public net.minecraft.world.InteractionResult useOn(net.minecraft.world.item.context.UseOnContext context) - Overrides:
useOnin classnet.minecraft.world.item.Item
-
canPerformAction
public boolean canPerformAction(net.minecraft.world.item.ItemStack stack, net.neoforged.neoforge.common.ItemAbility itemAbility) - Specified by:
canPerformActionin interfacenet.neoforged.neoforge.common.extensions.IItemExtension
-
shouldTriggerUseEffects
public net.createmod.catnip.data.TriState shouldTriggerUseEffects(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity) Description copied from interface:CustomUseEffectsItemCalled to determine if use effects should be applied for this item.- Specified by:
shouldTriggerUseEffectsin interfaceCustomUseEffectsItem- 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
public boolean triggerUseEffects(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity, int count, net.minecraft.util.RandomSource random) Description copied from interface:CustomUseEffectsItemCalled when use effects should be applied for this item.- Specified by:
triggerUseEffectsin interfaceCustomUseEffectsItem- 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
-
getEatingSound
public net.minecraft.sounds.SoundEvent getEatingSound()- Overrides:
getEatingSoundin classnet.minecraft.world.item.Item
-
getUseAnimation
public net.minecraft.world.item.UseAnim getUseAnimation(net.minecraft.world.item.ItemStack stack) - Overrides:
getUseAnimationin classnet.minecraft.world.item.Item
-
getUseDuration
public int getUseDuration(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity) - Overrides:
getUseDurationin classnet.minecraft.world.item.Item
-
getEnchantmentValue
public int getEnchantmentValue()- Overrides:
getEnchantmentValuein classnet.minecraft.world.item.Item
-
initializeClient
public void initializeClient(Consumer<net.neoforged.neoforge.client.extensions.common.IClientItemExtensions> consumer) - Overrides:
initializeClientin classnet.minecraft.world.item.Item
-