Class NetworkItem

java.lang.Object
net.minecraft.world.item.Item
com.refinedmods.refinedstorage.item.EnergyItem
com.refinedmods.refinedstorage.item.NetworkItem
All Implemented Interfaces:
INetworkItemProvider, net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.ItemLike, net.neoforged.neoforge.common.extensions.IItemExtension
Direct Known Subclasses:
WirelessCraftingMonitorItem, WirelessFluidGridItem, WirelessGridItem

public abstract class NetworkItem extends EnergyItem implements INetworkItemProvider
  • Nested Class Summary

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

    net.minecraft.world.item.Item.Properties
  • 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
    Modifier
    Constructor
    Description
    protected
    NetworkItem(net.minecraft.world.item.Item.Properties item, boolean creative, Supplier<Integer> energyCapacity)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    appendHoverText(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level level, List<net.minecraft.network.chat.Component> tooltip, net.minecraft.world.item.TooltipFlag flag)
     
    void
    applyNetwork(net.minecraft.server.MinecraftServer server, net.minecraft.world.item.ItemStack stack, Consumer<INetwork> onNetwork, Consumer<net.minecraft.network.chat.Component> onError)
     
    static net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>
    getDimension(net.minecraft.world.item.ItemStack stack)
     
    static int
    getX(net.minecraft.world.item.ItemStack stack)
     
    static int
    getY(net.minecraft.world.item.ItemStack stack)
     
    static int
    getZ(net.minecraft.world.item.ItemStack stack)
     
    net.minecraft.world.InteractionResult
    interactLivingEntity(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.player.Player playerIn, net.minecraft.world.entity.LivingEntity target, net.minecraft.world.InteractionHand hand)
     
    static boolean
    isValid(net.minecraft.world.item.ItemStack stack)
     
    boolean
    shouldCauseReequipAnimation(net.minecraft.world.item.ItemStack oldStack, net.minecraft.world.item.ItemStack newStack, boolean slotChanged)
     
    net.minecraft.world.InteractionResultHolder<net.minecraft.world.item.ItemStack>
    use(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand)
     
    net.minecraft.world.InteractionResult
    useOn(net.minecraft.world.item.context.UseOnContext ctx)
     

    Methods inherited from class com.refinedmods.refinedstorage.item.EnergyItem

    createEnergyStorage, getBarColor, getBarWidth, isBarVisible

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

    asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getFoodProperties, getId, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getRenderPropertiesInternal, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, initializeClient, inventoryTick, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isFoil, isRepairable, isValidRepairItem, mineBlock, onCraftedBy, onCraftedPostProcess, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, shouldOverrideMultiplayerNbt, toString, 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.neoforged.neoforge.common.extensions.IItemExtension

    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, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onStopUsing, setDamage, shouldCauseBlockBreakReset

    Methods inherited from interface com.refinedmods.refinedstorage.api.network.item.INetworkItemProvider

    provide
  • Constructor Details

    • NetworkItem

      protected NetworkItem(net.minecraft.world.item.Item.Properties item, boolean creative, Supplier<Integer> energyCapacity)
  • Method Details

    • getDimension

      @Nullable public static net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> getDimension(net.minecraft.world.item.ItemStack stack)
    • getX

      public static int getX(net.minecraft.world.item.ItemStack stack)
    • getY

      public static int getY(net.minecraft.world.item.ItemStack stack)
    • getZ

      public static int getZ(net.minecraft.world.item.ItemStack stack)
    • isValid

      public static boolean isValid(net.minecraft.world.item.ItemStack stack)
    • use

      public net.minecraft.world.InteractionResultHolder<net.minecraft.world.item.ItemStack> use(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand)
      Overrides:
      use in class net.minecraft.world.item.Item
    • applyNetwork

      public void applyNetwork(net.minecraft.server.MinecraftServer server, net.minecraft.world.item.ItemStack stack, Consumer<INetwork> onNetwork, Consumer<net.minecraft.network.chat.Component> onError)
    • appendHoverText

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

      public net.minecraft.world.InteractionResult interactLivingEntity(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.player.Player playerIn, net.minecraft.world.entity.LivingEntity target, net.minecraft.world.InteractionHand hand)
      Overrides:
      interactLivingEntity in class net.minecraft.world.item.Item
    • useOn

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

      public boolean shouldCauseReequipAnimation(net.minecraft.world.item.ItemStack oldStack, net.minecraft.world.item.ItemStack newStack, boolean slotChanged)
      Specified by:
      shouldCauseReequipAnimation in interface net.neoforged.neoforge.common.extensions.IItemExtension