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

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
    static class 
     
    static class 
     
    static class 
     

    Nested classes/interfaces inherited from class net.minecraft.world.item.Item

    net.minecraft.world.item.Item.Properties

    Nested 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_SIZE

    Fields inherited from interface net.minecraft.world.flag.FeatureElement

    FILTERED_REGISTRIES
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    cycleDigMode(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.world.entity.player.Player player, JackHammerItem.DigMode digMode)
     
    net.minecraft.world.MenuProvider
    Get a container provider for this item
    float
    getDestroySpeed(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.block.state.BlockState state)
     
    getDigMode(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 long
     
    int
    getTintColor(net.minecraft.world.item.ItemStack stack, int tintIndex)
     
    boolean
    isCorrectToolForDrops(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.block.state.BlockState state)
     
    boolean
    onBlockStartBreak(net.minecraft.world.item.ItemStack itemstack, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player)
     
    boolean
    onEntitySwing(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity)
     
    void
    onShiftScrolled(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 void
    setDigMode(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 net.minecraft.world.item.Item

    appendHoverText, asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDrinkingSound, getEatingSound, getFoodProperties, getId, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getRenderPropertiesInternal, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, inventoryTick, isComplex, isCorrectToolForDrops, isEdible, isFireResistant, isFoil, isRepairable, isValidRepairItem, mineBlock, onCraftedBy, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, shouldOverrideMultiplayerNbt, toString, useOn, useOnRelease, verifyTagAfterLoad

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.minecraft.world.flag.FeatureElement

    isEnabled

    Methods inherited from interface net.minecraftforge.common.extensions.IForgeItem

    canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canGrindstoneRepair, 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, onStopUsing, readShareTag, setDamage, shouldCauseBlockBreakReset

    Methods 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

      public DrillBitItem.DrillBitType getDrillBit(net.minecraft.world.item.ItemStack stack)
    • isCorrectToolForDrops

      public boolean isCorrectToolForDrops(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.block.state.BlockState state)
      Specified by:
      isCorrectToolForDrops in interface net.minecraftforge.common.extensions.IForgeItem
    • getDestroySpeed

      public float getDestroySpeed(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.block.state.BlockState state)
      Overrides:
      getDestroySpeed in class net.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:
      use in class net.minecraft.world.item.Item
    • onEntitySwing

      public boolean onEntitySwing(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity)
      Specified by:
      onEntitySwing in interface net.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:
      onBlockStartBreak in interface net.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.world.entity.player.Player player, JackHammerItem.DigMode digMode)
    • getContainerProvider

      public net.minecraft.world.MenuProvider getContainerProvider(ChargingStationBlockEntity te)
      Description copied from interface: IChargeableContainerProvider
      Get a container provider for this item
      Specified by:
      getContainerProvider in interface IChargeableContainerProvider
      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:
      getTintColor in interface ColorHandlers.ITintableItem
    • getDigMode

      public static JackHammerItem.DigMode getDigMode(net.minecraft.world.item.ItemStack stack)
    • 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: IShiftScrollable
      Called both client- and server-side when a player shift-scrolls the mouse wheel, while holding an item which implements this interface.
      Specified by:
      onShiftScrolled in interface IShiftScrollable
      Parameters:
      player - player doing the shift-scrolling
      forward - true if the mouse wheel was rotated up, false if rotated down
      hand - hand in which the item is held