Class DroneItem
java.lang.Object
net.minecraftforge.registries.ForgeRegistryEntry<net.minecraft.world.item.Item>
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,net.minecraftforge.registries.IForgeRegistryEntry<net.minecraft.world.item.Item>
public class DroneItem
extends PressurizableItem
implements IChargeableContainerProvider, IProgrammable, ColorHandlers.ITintableItem
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.Item
net.minecraft.world.item.Item.PropertiesNested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
net.minecraftforge.registries.ForgeRegistryEntry.UncheckedRegistryEntry<V extends net.minecraftforge.registries.IForgeRegistryEntry<V>>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_SIZEFields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegateFields inherited from interface me.desht.pneumaticcraft.api.item.IProgrammable
NBT_WIDGETS -
Constructor Summary
ConstructorsConstructorDescriptionDroneItem(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 TypeMethodDescriptionvoidappendHoverText(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) booleancanProgram(net.minecraft.world.item.ItemStack stack) When returned true, this stack may be programmed.net.minecraft.world.MenuProviderGet a container provider for this itemnet.minecraft.world.item.DyeColorgetDroneColor(net.minecraft.world.item.ItemStack stack) intgetTintColor(net.minecraft.world.item.ItemStack stack, int tintIndex) booleanonEntityItemUpdate(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.item.ItemEntity entity) booleanCheck if the item should have a tooltip added detailing the puzzle piece used to program it.voidspawnDrone(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.InteractionResultuseOn(net.minecraft.world.item.context.UseOnContext ctx) booleanusesPieces(net.minecraft.world.item.ItemStack stack) Check if Programming Puzzles are needed to program this item.Methods inherited from class me.desht.pneumaticcraft.common.item.PressurizableItem
fillItemCategory, getAir, getBarColor, getBarWidth, getBaseVolume, getEnchantmentValue, getShareTag, getVolumeUpgrades, initCapabilities, isBarVisible, isEnchantable, roundedPressure, shouldCauseReequipAnimationMethods inherited from class net.minecraft.world.item.Item
allowdedIn, 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, verifyTagAfterLoadMethods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraftforge.common.extensions.IForgeItem
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getArmorTexture, getAttributeModifiers, getBurnTime, getContainerItem, getCreativeTabs, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getItemEnchantability, getItemStackLimit, getMaxDamage, getSweepHitBox, getXpRepairRatio, hasContainerItem, hasCustomEntity, isBookEnchantable, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onUsingTick, readShareTag, setDamage, shouldCauseBlockBreakResetMethods 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:
useOnin classnet.minecraft.world.item.Item
-
onEntityItemUpdate
public boolean onEntityItemUpdate(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.item.ItemEntity entity) - Specified by:
onEntityItemUpdatein interfacenet.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:
appendHoverTextin classnet.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:IProgrammableWhen returned true, this stack may be programmed. Can be used to limit programmability by NBT data, for example.- Specified by:
canProgramin interfaceIProgrammable- 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:IProgrammableCheck 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:
usesPiecesin interfaceIProgrammable- 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:IProgrammableCheck if the item should have a tooltip added detailing the puzzle piece used to program it.- Specified by:
showProgramTooltipin interfaceIProgrammable- Returns:
- true if the item should have tooltip information added
-
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
-