Class DroneItem

java.lang.Object
net.minecraft.world.item.Item
me.desht.pneumaticcraft.common.item.PressurizableItem
me.desht.pneumaticcraft.common.item.DroneItem
All Implemented Interfaces:
IProgrammable, IPressurizableItem, ColorHandlers.ITintableItem, IChargeableContainerProvider, net.minecraft.world.item.Vanishable, net.minecraft.world.level.ItemLike, net.minecraftforge.common.extensions.IForgeItem

  • Nested Class Summary

    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, category, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZE

    Fields inherited from interface me.desht.pneumaticcraft.api.item.IProgrammable

    NBT_WIDGETS
  • Constructor Summary

    Constructors
    Constructor
    Description
    DroneItem(BiFunction<net.minecraft.world.level.Level,net.minecraft.world.entity.player.Player,DroneEntity> droneCreator, boolean programmable, net.minecraft.world.item.DyeColor defaultColor)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    appendHoverText(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level worldIn, List<net.minecraft.network.chat.Component> tooltip, net.minecraft.world.item.TooltipFlag flagIn)
     
    boolean
    canProgram(net.minecraft.world.item.ItemStack stack)
    When returned true, this stack may be programmed.
    net.minecraft.world.MenuProvider
    Get a container provider for this item
    net.minecraft.world.item.DyeColor
    getDroneColor(net.minecraft.world.item.ItemStack stack)
     
    int
    getTintColor(net.minecraft.world.item.ItemStack stack, int tintIndex)
     
    boolean
    onEntityItemUpdate(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.item.ItemEntity entity)
     
    boolean
    Check if the item should have a tooltip added detailing the puzzle piece used to program it.
    void
    spawnDrone(net.minecraft.world.entity.player.Player player, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos clickPos, net.minecraft.core.Direction facing, net.minecraft.core.BlockPos placePos, net.minecraft.world.item.ItemStack iStack)
     
    net.minecraft.world.InteractionResult
    useOn(net.minecraft.world.item.context.UseOnContext ctx)
     
    boolean
    usesPieces(net.minecraft.world.item.ItemStack stack)
    Check if Programming Puzzles are needed to program this item.

    Methods inherited from class net.minecraft.world.item.Item

    allowedIn, asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEquipSound, getFoodProperties, getId, getItemCategory, 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, shouldOverrideMultiplayerNbt, toString, use, useOnRelease, verifyTagAfterLoad

    Methods inherited from class java.lang.Object

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

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

    canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreativeTabs, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, isBookEnchantable, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onUsingTick, readShareTag, setDamage, shouldCauseBlockBreakReset

    Methods inherited from interface me.desht.pneumaticcraft.api.pressure.IPressurizableItem

    getEffectiveVolume, getPressure
  • Constructor Details

    • DroneItem

      public DroneItem(BiFunction<net.minecraft.world.level.Level,net.minecraft.world.entity.player.Player,DroneEntity> droneCreator, boolean programmable, net.minecraft.world.item.DyeColor defaultColor)
  • Method Details

    • useOn

      public net.minecraft.world.InteractionResult useOn(net.minecraft.world.item.context.UseOnContext ctx)
      Overrides:
      useOn in class net.minecraft.world.item.Item
    • onEntityItemUpdate

      public boolean onEntityItemUpdate(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.item.ItemEntity entity)
      Specified by:
      onEntityItemUpdate in interface net.minecraftforge.common.extensions.IForgeItem
    • appendHoverText

      public void appendHoverText(net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.world.level.Level worldIn, List<net.minecraft.network.chat.Component> tooltip, net.minecraft.world.item.TooltipFlag flagIn)
      Overrides:
      appendHoverText in class net.minecraft.world.item.Item
    • getDroneColor

      public net.minecraft.world.item.DyeColor getDroneColor(net.minecraft.world.item.ItemStack stack)
    • spawnDrone

      public void spawnDrone(net.minecraft.world.entity.player.Player player, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos clickPos, net.minecraft.core.Direction facing, net.minecraft.core.BlockPos placePos, net.minecraft.world.item.ItemStack iStack)
    • canProgram

      public boolean canProgram(net.minecraft.world.item.ItemStack stack)
      Description copied from interface: IProgrammable
      When returned true, this stack may be programmed. Can be used to limit programmability by NBT data, for example.
      Specified by:
      canProgram in interface IProgrammable
      Parameters:
      stack - the item stack to check
      Returns:
      true if the item can be programmed, false otherwise
    • usesPieces

      public boolean usesPieces(net.minecraft.world.item.ItemStack stack)
      Description copied from interface: IProgrammable
      Check if Programming Puzzles are needed to program this item. When returned false, it's free to program. Drones and Network API's return true in PneumaticCraft, Network Storages return false.
      Specified by:
      usesPieces in interface IProgrammable
      Parameters:
      stack - the item stack to check
      Returns:
      true if puzzle pieces are required by the Programmer to program the item
    • showProgramTooltip

      public boolean showProgramTooltip()
      Description copied from interface: IProgrammable
      Check if the item should have a tooltip added detailing the puzzle piece used to program it.
      Specified by:
      showProgramTooltip in interface IProgrammable
      Returns:
      true if the item should have tooltip information added
    • 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