public abstract class MachineBaseBlockEntity extends net.minecraft.tileentity.TileEntityLockable implements ISyncable, net.minecraft.util.ITickable, net.minecraft.inventory.ISidedInventory
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
customName |
protected int[] |
processTime |
protected int[] |
totalProcessTime |
| Constructor and Description |
|---|
MachineBaseBlockEntity() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canExtractItem(int index,
net.minecraft.item.ItemStack stack,
net.minecraft.util.EnumFacing direction) |
boolean |
canInsertItem(int index,
net.minecraft.item.ItemStack stack,
net.minecraft.util.EnumFacing direction) |
protected boolean |
canProcess(int process) |
void |
clear() |
void |
closeInventory(net.minecraft.entity.player.EntityPlayer player) |
net.minecraft.inventory.Container |
createContainer(net.minecraft.entity.player.InventoryPlayer playerInventory,
net.minecraft.entity.player.EntityPlayer playerIn) |
protected void |
decreaseStackSize(int slot) |
net.minecraft.item.ItemStack |
decrStackSize(int index,
int count) |
<T> T |
getCapability(net.minecraftforge.common.capabilities.Capability<T> capability,
net.minecraft.util.EnumFacing facing) |
int |
getField(int id) |
int |
getFieldCount() |
java.lang.String |
getGuiID() |
protected abstract int[] |
getInputs() |
protected abstract int[] |
getInputs(int process) |
int |
getInventoryStackLimit() |
protected int |
getMainOutput(int process) |
java.lang.String |
getName() |
protected abstract int[] |
getOutputs() |
int |
getOutputSlot(net.minecraft.item.ItemStack output) |
protected int |
getProcess(int slot) |
protected int |
getProcessCount() |
int |
getSizeInventory() |
protected abstract net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> |
getSlots() |
int[] |
getSlotsForFace(net.minecraft.util.EnumFacing side) |
net.minecraft.item.ItemStack |
getStackInSlot(int index) |
protected int |
getStackProcessTime(net.minecraft.item.ItemStack stack) |
net.minecraft.util.NonNullList |
getSyncFields(net.minecraft.util.NonNullList fields) |
net.minecraft.network.play.server.SPacketUpdateTileEntity |
getUpdatePacket() |
net.minecraft.nbt.NBTTagCompound |
getUpdateTag() |
boolean |
hasCustomName() |
boolean |
hasOutputSlot(net.minecraft.item.ItemStack output) |
boolean |
isEmpty() |
boolean |
isItemValidForSlot(int index,
net.minecraft.item.ItemStack stack) |
static boolean |
isProcessing(net.minecraft.inventory.IInventory inventory,
int index) |
boolean |
isProcessing(int index) |
boolean |
isUsableByPlayer(net.minecraft.entity.player.EntityPlayer player) |
protected void |
mergeStack(int slot,
net.minecraft.item.ItemStack stack) |
void |
onDataPacket(net.minecraft.network.NetworkManager networkManager,
net.minecraft.network.play.server.SPacketUpdateTileEntity packet) |
protected void |
onSlotUpdate() |
void |
openInventory(net.minecraft.entity.player.EntityPlayer player) |
void |
packetDataHandler(io.netty.buffer.ByteBuf dataStream) |
protected void |
processItem(int process) |
void |
readFromNBT(net.minecraft.nbt.NBTTagCompound compound) |
net.minecraft.item.ItemStack |
removeStackFromSlot(int index) |
void |
setCustomInventoryName(java.lang.String customName) |
void |
setField(int id,
int value) |
void |
setInventorySlotContents(int index,
net.minecraft.item.ItemStack stack) |
protected void |
setSlots(net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> slots) |
protected boolean |
shouldResetProgress() |
void |
update() |
net.minecraft.nbt.NBTTagCompound |
writeToNBT(net.minecraft.nbt.NBTTagCompound compound) |
createUnSidedHandler, getDisplayName, getLockCode, hasCapability, isLocked, setLockCodeaddInfoToCrashReport, canRenderBreaking, create, deserializeNBT, getBlockMetadata, getBlockType, getDistanceSq, getKey, getMaxRenderDistanceSquared, getPos, getRenderBoundingBox, getTileData, getWorld, handleUpdateTag, hasFastRenderer, hasWorld, invalidate, isInvalid, markDirty, mirror, onChunkUnload, onLoad, onlyOpsCanSetNbt, receiveClientEvent, register, restrictNBTCopy, rotate, serializeNBT, setPos, setWorld, setWorldCreate, shouldRefresh, shouldRenderInPass, updateContainingBlockInfo, validateprotected java.lang.String customName
protected int[] processTime
protected int[] totalProcessTime
public static boolean isProcessing(net.minecraft.inventory.IInventory inventory,
int index)
public void readFromNBT(net.minecraft.nbt.NBTTagCompound compound)
readFromNBT in class net.minecraft.tileentity.TileEntityLockablepublic net.minecraft.nbt.NBTTagCompound writeToNBT(net.minecraft.nbt.NBTTagCompound compound)
writeToNBT in class net.minecraft.tileentity.TileEntityLockablepublic net.minecraft.item.ItemStack getStackInSlot(int index)
getStackInSlot in interface net.minecraft.inventory.IInventorypublic net.minecraft.item.ItemStack decrStackSize(int index,
int count)
decrStackSize in interface net.minecraft.inventory.IInventorypublic net.minecraft.util.NonNullList getSyncFields(net.minecraft.util.NonNullList fields)
getSyncFields in interface ISyncablepublic net.minecraft.item.ItemStack removeStackFromSlot(int index)
removeStackFromSlot in interface net.minecraft.inventory.IInventorypublic void setInventorySlotContents(int index,
net.minecraft.item.ItemStack stack)
setInventorySlotContents in interface net.minecraft.inventory.IInventorypublic boolean hasCustomName()
hasCustomName in interface net.minecraft.world.IWorldNameablepublic void setCustomInventoryName(java.lang.String customName)
public int getSizeInventory()
getSizeInventory in interface net.minecraft.inventory.IInventorypublic boolean isProcessing(int index)
public void update()
update in interface net.minecraft.util.ITickablepublic boolean isUsableByPlayer(net.minecraft.entity.player.EntityPlayer player)
isUsableByPlayer in interface net.minecraft.inventory.IInventorypublic void openInventory(net.minecraft.entity.player.EntityPlayer player)
openInventory in interface net.minecraft.inventory.IInventorypublic void closeInventory(net.minecraft.entity.player.EntityPlayer player)
closeInventory in interface net.minecraft.inventory.IInventorypublic boolean isItemValidForSlot(int index,
net.minecraft.item.ItemStack stack)
isItemValidForSlot in interface net.minecraft.inventory.IInventorypublic int[] getSlotsForFace(net.minecraft.util.EnumFacing side)
getSlotsForFace in interface net.minecraft.inventory.ISidedInventorypublic boolean canInsertItem(int index,
net.minecraft.item.ItemStack stack,
net.minecraft.util.EnumFacing direction)
canInsertItem in interface net.minecraft.inventory.ISidedInventoryprotected int getProcess(int slot)
protected boolean canProcess(int process)
protected void processItem(int process)
protected int getMainOutput(int process)
protected int getStackProcessTime(net.minecraft.item.ItemStack stack)
protected int getProcessCount()
protected abstract int[] getInputs()
protected abstract int[] getInputs(int process)
protected abstract int[] getOutputs()
protected abstract net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> getSlots()
public boolean hasOutputSlot(net.minecraft.item.ItemStack output)
public int getOutputSlot(net.minecraft.item.ItemStack output)
public int getField(int id)
getField in interface net.minecraft.inventory.IInventorypublic void setField(int id,
int value)
setField in interface net.minecraft.inventory.IInventorypublic int getFieldCount()
getFieldCount in interface net.minecraft.inventory.IInventorypublic void clear()
clear in interface net.minecraft.inventory.IInventorypublic boolean canExtractItem(int index,
net.minecraft.item.ItemStack stack,
net.minecraft.util.EnumFacing direction)
canExtractItem in interface net.minecraft.inventory.ISidedInventoryprotected void mergeStack(int slot,
net.minecraft.item.ItemStack stack)
protected void decreaseStackSize(int slot)
public int getInventoryStackLimit()
getInventoryStackLimit in interface net.minecraft.inventory.IInventorypublic net.minecraft.network.play.server.SPacketUpdateTileEntity getUpdatePacket()
getUpdatePacket in class net.minecraft.tileentity.TileEntitypublic net.minecraft.nbt.NBTTagCompound getUpdateTag()
getUpdateTag in class net.minecraft.tileentity.TileEntitypublic void onDataPacket(net.minecraft.network.NetworkManager networkManager,
net.minecraft.network.play.server.SPacketUpdateTileEntity packet)
onDataPacket in class net.minecraft.tileentity.TileEntityprotected boolean shouldResetProgress()
protected void setSlots(net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> slots)
protected void onSlotUpdate()
public boolean isEmpty()
isEmpty in interface net.minecraft.inventory.IInventorypublic java.lang.String getName()
getName in interface net.minecraft.world.IWorldNameablepublic net.minecraft.inventory.Container createContainer(net.minecraft.entity.player.InventoryPlayer playerInventory,
net.minecraft.entity.player.EntityPlayer playerIn)
createContainer in interface net.minecraft.world.IInteractionObjectpublic java.lang.String getGuiID()
getGuiID in interface net.minecraft.world.IInteractionObject@Nullable
public <T> T getCapability(net.minecraftforge.common.capabilities.Capability<T> capability,
@Nullable
net.minecraft.util.EnumFacing facing)
getCapability in interface net.minecraftforge.common.capabilities.ICapabilityProvidergetCapability in class net.minecraft.tileentity.TileEntityLockablepublic void packetDataHandler(io.netty.buffer.ByteBuf dataStream)
packetDataHandler in interface ISyncable