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>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanareUpgradeSlotsValidForTier(net.minecraft.world.Container inventory, int tier) abstract booleancanConsume(net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.level.Level world) Check if the given item can be infused.booleancanExtractItem(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.booleancanInsertItem(net.minecraft.world.Container inventory, int slot, net.minecraft.world.item.ItemStack itemStack) Check if the given item can be inserted.intprotected abstract net.minecraft.world.level.block.BlockgetBlock()protected intgetRequiredTierForSlot(int slotId) intgetTier(net.minecraft.world.Container inventory) protected booleanisTierUpgrade(net.minecraft.world.item.ItemStack itemStack) protected booleanisUpgradeSlot(int slotId) booleanisUpgradeSlotEnabled(net.minecraft.world.Container inventory, int slotId)
-
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
-
getBlock
protected abstract net.minecraft.world.level.block.Block getBlock()
-