Class BlockEntityWorking.Metadata

java.lang.Object
org.cyclops.evilcraft.core.blockentity.BlockEntityWorking.Metadata
Direct Known Subclasses:
BlockEntityBloodInfuser.Metadata, BlockEntitySanguinaryEnvironmentalAccumulator.Metadata, BlockEntitySpiritFurnace.Metadata
Enclosing class:
BlockEntityWorking<T extends BlockEntityWorking<T,O>,O>

public abstract static class BlockEntityWorking.Metadata extends Object
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Metadata(int basicInventorySize)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    areUpgradeSlotsValidForTier(net.minecraft.world.Container inventory, int tier)
     
    abstract boolean
    canConsume(net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.level.Level world)
    Check if the given item can be infused.
    boolean
    canExtractItem(net.minecraft.world.Container inventory, int slot, net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.item.ItemStack replaceItem)
    If the given item can be extracted.
    boolean
    canInsertItem(net.minecraft.world.Container inventory, int slot, net.minecraft.world.item.ItemStack itemStack)
    Check if the given item can be inserted.
    int
     
    protected abstract net.minecraft.world.level.block.Block
     
    protected int
     
    int
    getTier(net.minecraft.world.Container inventory)
     
     
    protected boolean
    isTierUpgrade(net.minecraft.world.item.ItemStack itemStack)
     
    protected boolean
    isUpgradeSlot(int slotId)
     
    boolean
    isUpgradeSlotEnabled(net.minecraft.world.Container inventory, int slotId)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Metadata

      protected Metadata(int basicInventorySize)
  • Method Details

    • getBasicInventorySize

      public int getBasicInventorySize()
    • canConsume

      public abstract boolean canConsume(net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.level.Level world)
      Check if the given item can be infused.
      Parameters:
      itemStack - The item to check.
      world - The world.
      Returns:
      If it can be infused.
    • canInsertItem

      public boolean canInsertItem(net.minecraft.world.Container inventory, int slot, net.minecraft.world.item.ItemStack itemStack)
      Check if the given item can be inserted.
      Parameters:
      inventory - The tile inventory.
      slot - The slot id.
      itemStack - The item that is being inserted.
      Returns:
      If it can be inserted.
    • canExtractItem

      public boolean canExtractItem(net.minecraft.world.Container inventory, int slot, net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.item.ItemStack replaceItem)
      If the given item can be extracted.
      Parameters:
      inventory - The tile inventory.
      slot - The slot id.
      itemStack - The item that is being extracted, the current slot contents.
      replaceItem - The current item in that slot.
      Returns:
      If it can be extracted.
    • isUpgradeSlot

      protected boolean isUpgradeSlot(int slotId)
    • isTierUpgrade

      protected boolean isTierUpgrade(net.minecraft.world.item.ItemStack itemStack)
    • areUpgradeSlotsValidForTier

      protected boolean areUpgradeSlotsValidForTier(net.minecraft.world.Container inventory, int tier)
    • isUpgradeSlotEnabled

      public boolean isUpgradeSlotEnabled(net.minecraft.world.Container inventory, int slotId)
    • getRequiredTierForSlot

      protected int getRequiredTierForSlot(int slotId)
    • getTier

      public int getTier(net.minecraft.world.Container inventory)
      Parameters:
      inventory - The tile inventory.
      Returns:
      The current tier of this machine.
    • getUpgrades

      public Set<Upgrades.Upgrade> getUpgrades()
    • getBlock

      protected abstract net.minecraft.world.level.block.Block getBlock()