Class JackHammerItem
java.lang.Object
net.minecraft.world.item.Item
me.desht.pneumaticcraft.common.item.PressurizableItem
me.desht.pneumaticcraft.common.item.JackHammerItem
- All Implemented Interfaces:
IPressurizableItem,ColorHandlers.ITintableItem,IChargeableContainerProvider,IShiftScrollable,net.minecraft.world.flag.FeatureElement,net.minecraft.world.item.Vanishable,net.minecraft.world.level.ItemLike,net.minecraftforge.common.extensions.IForgeItem
public class JackHammerItem
extends PressurizableItem
implements IChargeableContainerProvider, ColorHandlers.ITintableItem, IShiftScrollable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic classstatic classstatic classNested classes/interfaces inherited from class net.minecraft.world.item.Item
net.minecraft.world.item.Item.PropertiesNested classes/interfaces inherited from interface me.desht.pneumaticcraft.common.item.IChargeableContainerProvider
IChargeableContainerProvider.Provider -
Field Summary
Fields inherited from class net.minecraft.world.item.Item
BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZEFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JackHammerItem.DigModecycleDigMode(net.minecraft.world.item.ItemStack stack, boolean forward) static Set<net.minecraft.core.BlockPos>getBreakPositions(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction dir, net.minecraft.core.Direction playerHoriz, JackHammerItem.DigMode digMode) net.minecraft.world.MenuProviderGet a container provider for this itemfloatgetDestroySpeed(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.block.state.BlockState state) static JackHammerItem.DigModegetDigMode(net.minecraft.world.item.ItemStack stack) getDrillBit(net.minecraft.world.item.ItemStack stack) getDrillBitHandler(net.minecraft.world.item.ItemStack stack) getEnchantmentHandler(net.minecraft.world.item.ItemStack stack) static longintgetTintColor(net.minecraft.world.item.ItemStack stack, int tintIndex) booleanisCorrectToolForDrops(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.block.state.BlockState state) booleanmineBlock(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level worldIn, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.LivingEntity entityLiving) booleanonBlockStartBreak(net.minecraft.world.item.ItemStack itemstack, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player) booleanonEntitySwing(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity) voidonShiftScrolled(net.minecraft.world.entity.player.Player player, boolean forward, net.minecraft.world.InteractionHand hand) Called both client- and server-side when a player shift-scrolls the mouse wheel, while holding an item which implements this interface.static voidsetDigMode(net.minecraft.world.item.ItemStack stack, JackHammerItem.DigMode mode) 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) Methods inherited from class me.desht.pneumaticcraft.common.item.PressurizableItem
getAir, getBarColor, getBarWidth, getBaseVolume, getEnchantmentValue, getMaxPressure, getShareTag, getVolumeUpgrades, initCapabilities, isBarVisible, isEnchantable, roundedPressure, shouldCauseReequipAnimationMethods inherited from class net.minecraft.world.item.Item
appendHoverText, asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDrinkingSound, getEatingSound, getEquipSound, getFoodProperties, getId, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getRenderPropertiesInternal, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, inventoryTick, isComplex, isCorrectToolForDrops, isEdible, isFireResistant, isFoil, isRepairable, isValidRepairItem, onCraftedBy, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, shouldOverrideMultiplayerNbt, toString, useOn, useOnRelease, verifyTagAfterLoadMethods 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.minecraftforge.common.extensions.IForgeItem
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, isBookEnchantable, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onUsingTick, readShareTag, setDamage, shouldCauseBlockBreakResetMethods inherited from interface me.desht.pneumaticcraft.api.pressure.IPressurizableItem
getEffectiveVolume, getPressure
-
Constructor Details
-
JackHammerItem
public JackHammerItem()
-
-
Method Details
-
getLastModeSwitchTime
public static long getLastModeSwitchTime() -
getDrillBitHandler
public static JackHammerItem.DrillBitHandler getDrillBitHandler(net.minecraft.world.item.ItemStack stack) -
getEnchantmentHandler
public static JackHammerItem.EnchantmentHandler getEnchantmentHandler(net.minecraft.world.item.ItemStack stack) -
getDrillBit
-
isCorrectToolForDrops
public boolean isCorrectToolForDrops(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.block.state.BlockState state) - Specified by:
isCorrectToolForDropsin interfacenet.minecraftforge.common.extensions.IForgeItem
-
getDestroySpeed
public float getDestroySpeed(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.block.state.BlockState state) - Overrides:
getDestroySpeedin classnet.minecraft.world.item.Item
-
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
-
mineBlock
public boolean mineBlock(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level worldIn, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.LivingEntity entityLiving) - Overrides:
mineBlockin classnet.minecraft.world.item.Item
-
onEntitySwing
public boolean onEntitySwing(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity) - Specified by:
onEntitySwingin interfacenet.minecraftforge.common.extensions.IForgeItem
-
onBlockStartBreak
public boolean onBlockStartBreak(net.minecraft.world.item.ItemStack itemstack, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player) - Specified by:
onBlockStartBreakin interfacenet.minecraftforge.common.extensions.IForgeItem
-
getBreakPositions
public static Set<net.minecraft.core.BlockPos> getBreakPositions(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction dir, net.minecraft.core.Direction playerHoriz, JackHammerItem.DigMode digMode) -
getContainerProvider
Description copied from interface:IChargeableContainerProviderGet a container provider for this item- Specified by:
getContainerProviderin interfaceIChargeableContainerProvider- Parameters:
te- the charging station that the item is in- Returns:
- the container provider
-
getTintColor
public int getTintColor(net.minecraft.world.item.ItemStack stack, int tintIndex) - Specified by:
getTintColorin interfaceColorHandlers.ITintableItem
-
getDigMode
-
setDigMode
public static void setDigMode(net.minecraft.world.item.ItemStack stack, JackHammerItem.DigMode mode) -
cycleDigMode
public static JackHammerItem.DigMode cycleDigMode(net.minecraft.world.item.ItemStack stack, boolean forward) -
onShiftScrolled
public void onShiftScrolled(net.minecraft.world.entity.player.Player player, boolean forward, net.minecraft.world.InteractionHand hand) Description copied from interface:IShiftScrollableCalled both client- and server-side when a player shift-scrolls the mouse wheel, while holding an item which implements this interface.- Specified by:
onShiftScrolledin interfaceIShiftScrollable- Parameters:
player- player doing the shift-scrollingforward- true if the mouse wheel was rotated up, false if rotated downhand- hand in which the item is held
-