O - The type of upgrade behaviour object.public abstract class TileWorking<T extends org.cyclops.cyclopscore.tileentity.TankInventoryTileEntity,O> extends WorkingTileEntity<T,O>
| Modifier and Type | Field and Description |
|---|---|
static net.minecraft.item.Item |
UPGRADE_ITEM |
INVENTORY_SIZE_UPGRADES, UPGRADE_EFFICIENCY, UPGRADE_SPEED, UPGRADE_TIER1, UPGRADE_TIER2, UPGRADE_TIER3, upgradeBehaviourtickingTileComponentsendUpdateOnTankChanged, tankSizeinventory, slotSides| Constructor and Description |
|---|
TileWorking(int inventorySize,
java.lang.String inventoryName,
int tankSize,
java.lang.String tankName,
net.minecraftforge.fluids.Fluid acceptedFluid)
Make a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
areUpgradeSlotsValidForTier(int tier) |
boolean |
canExtractItem(int slot,
net.minecraft.item.ItemStack itemStack,
net.minecraft.util.EnumFacing side) |
boolean |
canExtractItem(int slot,
net.minecraft.item.ItemStack itemStack,
net.minecraft.item.ItemStack replaceItem)
If the given item can be extracted.
|
boolean |
canInsertItem(int slot,
net.minecraft.item.ItemStack itemStack)
Check if the given item can be inserted.
|
boolean |
canInsertItem(int slot,
net.minecraft.item.ItemStack itemStack,
net.minecraft.util.EnumFacing side) |
protected int |
getRequiredTierForSlot(int slotId) |
static int |
getTankTierMultiplier(int tier)
Get the tank capacity multiplier.
|
int |
getTier() |
int |
getUpgradeLevel(net.minecraft.item.ItemStack itemStack)
Get the level of upgrade corresponding to the given itemstack.
|
Upgrades.Upgrade |
getUpgradeType(net.minecraft.item.ItemStack itemStack)
Get the type of upgrade corresponding to the given itemstack.
|
boolean |
isItemValidForSlot(int slot,
net.minecraft.item.ItemStack itemStack) |
boolean |
isUpgradeSlotEnabled(int slotId) |
boolean |
onUpgradeSlotChanged(int slotId,
net.minecraft.item.ItemStack oldItemStack,
net.minecraft.item.ItemStack itemStack) |
protected void |
resetTier() |
canConsume, canWork, decrStackSize, getBasicInventorySize, getNewState, getRequiredWorkTicks, getUpgradeBehaviour, getUpgradeItems, getUpgradeLevels, getUpgrades, getWorkTick, getWorkTicker, getWorkTickScaled, isUpgradeSlot, isVisuallyWorking, isWorking, onStateChanged, resetUpgradeLevels, resetWork, resetWork, setInventorySlotContentsaddTicker, getCurrentState, getTickers, readFromNBT, updateTileEntity, writeToNBTcanDrain, canFill, drain, drain, drain, drain, fill, fill, getTank, getTankInfo, isSendUpdateOnTankChanged, newTank, onSendUpdate, setSendUpdateOnTankChangedaddSlotsToSide, getInventory, getSlotsForFacecanAccess, clear, closeInventory, getCapability, getDisplayName, getField, getFieldCount, getInventoryStackLimit, getName, getSizeInventory, getStackInSlot, hasCapability, hasCustomName, isSendUpdateOnInventoryChanged, isUseableByPlayer, onInventoryChanged, openInventory, removeStackFromSlot, setField, setSendUpdateOnInventoryChangedafterSendUpdate, beforeSendUpdate, canInteractWith, destroy, getBlock, getDescriptionPacket, getNBTTagCompound, getRotation, getUpdateBackoffTicks, isRotatable, isTicking, onDataPacket, onLoad, onUpdateReceived, readGeneratedFieldsFromNBT, sendImmediateUpdate, sendUpdate, setRotatable, setRotation, shouldRefresh, writeGeneratedFieldsToNBTaddInfoToCrashReport, addMapping, canRenderBreaking, createAndLoadEntity, deserializeNBT, func_183000_F, getBlockMetadata, getBlockType, getDistanceSq, getMaxRenderDistanceSquared, getPos, getRenderBoundingBox, getTileData, getWorld, hasWorldObj, invalidate, isInvalid, markDirty, onChunkUnload, receiveClientEvent, restrictNBTCopy, serializeNBT, setPos, setWorldObj, shouldRenderInPass, updateContainingBlockInfo, validatepublic TileWorking(int inventorySize,
java.lang.String inventoryName,
int tankSize,
java.lang.String tankName,
net.minecraftforge.fluids.Fluid acceptedFluid)
inventorySize - Amount of slots in the inventory.inventoryName - Internal name of the inventory.tankSize - Size (mB) of the tank.tankName - Internal name of the tank.acceptedFluid - Type of Fluid to accept.public Upgrades.Upgrade getUpgradeType(net.minecraft.item.ItemStack itemStack)
WorkingTileEntitygetUpgradeType in class WorkingTileEntity<T extends org.cyclops.cyclopscore.tileentity.TankInventoryTileEntity,O>itemStack - The itemstack. Not null.public int getUpgradeLevel(net.minecraft.item.ItemStack itemStack)
WorkingTileEntitygetUpgradeLevel in class WorkingTileEntity<T extends org.cyclops.cyclopscore.tileentity.TankInventoryTileEntity,O>itemStack - The itemstack. Not null.public boolean onUpgradeSlotChanged(int slotId,
net.minecraft.item.ItemStack oldItemStack,
net.minecraft.item.ItemStack itemStack)
onUpgradeSlotChanged in class WorkingTileEntity<T extends org.cyclops.cyclopscore.tileentity.TankInventoryTileEntity,O>public static int getTankTierMultiplier(int tier)
tier - The tier to multiply for.protected void resetTier()
public int getTier()
protected int getRequiredTierForSlot(int slotId)
protected boolean areUpgradeSlotsValidForTier(int tier)
public boolean isUpgradeSlotEnabled(int slotId)
public boolean canInsertItem(int slot,
net.minecraft.item.ItemStack itemStack,
net.minecraft.util.EnumFacing side)
canInsertItem in interface net.minecraft.inventory.ISidedInventorycanInsertItem in class org.cyclops.cyclopscore.tileentity.InventoryTileEntityBasepublic boolean canExtractItem(int slot,
net.minecraft.item.ItemStack itemStack,
net.minecraft.util.EnumFacing side)
canExtractItem in interface net.minecraft.inventory.ISidedInventorycanExtractItem in class org.cyclops.cyclopscore.tileentity.InventoryTileEntityBasepublic boolean isItemValidForSlot(int slot,
net.minecraft.item.ItemStack itemStack)
isItemValidForSlot in interface net.minecraft.inventory.IInventoryisItemValidForSlot in class org.cyclops.cyclopscore.tileentity.InventoryTileEntityBasepublic boolean canInsertItem(int slot,
net.minecraft.item.ItemStack itemStack)
slot - The slot id.itemStack - The item that is being inserted.public boolean canExtractItem(int slot,
net.minecraft.item.ItemStack itemStack,
net.minecraft.item.ItemStack replaceItem)
slot - The slot id.itemStack - The item that is being extracted, the current slot contents.replaceItem - The current item in that slot.