public class TileGenericPipe extends net.minecraft.tileentity.TileEntity implements net.minecraftforge.fluids.IFluidHandler, IPipeTile, ITileBufferHolder, IEnergyHandler, IDropControlInventory, ISyncedTile, ISolidSideTile, IGuiReturnHandler, IRedstoneEngineReceiver, IDebuggable
| Modifier and Type | Class and Description |
|---|---|
static class |
TileGenericPipe.CoreState |
static class |
TileGenericPipe.SideProperties |
IPipeTile.PipeType| Modifier and Type | Field and Description |
|---|---|
protected boolean |
attachPluggables |
protected boolean |
blockNeighborChange |
TileGenericPipe.CoreState |
coreState |
protected boolean |
deletePipe |
boolean |
initialized |
Pipe |
pipe |
protected boolean |
pipeBound |
boolean[] |
pipeConnectionsBuffer |
PipePluggableState |
pluggableState |
int |
redstoneInput |
int[] |
redstoneInputSide |
protected boolean |
refreshRenderState |
PipeRenderState |
renderState |
protected boolean |
resyncGateExpansions |
protected boolean |
sendClientUpdate |
protected TileGenericPipe.SideProperties |
sideProperties |
| Constructor and Description |
|---|
TileGenericPipe() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterStateUpdated(byte stateId)
Called after a state has been updated
|
void |
blockCreated(net.minecraftforge.common.util.ForgeDirection from,
net.minecraft.block.Block block,
net.minecraft.tileentity.TileEntity tile) |
void |
blockRemoved(net.minecraftforge.common.util.ForgeDirection from) |
boolean |
canConnectEnergy(net.minecraftforge.common.util.ForgeDirection from)
Returns TRUE if the TileEntity can connect on a given side.
|
boolean |
canConnectRedstoneEngine(net.minecraftforge.common.util.ForgeDirection side)
This function is queried on every attempt to receive energy from a
redstone engine as well.
|
boolean |
canDrain(net.minecraftforge.common.util.ForgeDirection from,
net.minecraftforge.fluids.Fluid fluid) |
boolean |
canFill(net.minecraftforge.common.util.ForgeDirection from,
net.minecraftforge.fluids.Fluid fluid) |
boolean |
canInjectItems(net.minecraftforge.common.util.ForgeDirection from) |
protected boolean |
canPipeConnect_internal(net.minecraft.tileentity.TileEntity with,
net.minecraftforge.common.util.ForgeDirection side) |
protected boolean |
canPipeConnect(net.minecraft.tileentity.TileEntity with,
net.minecraftforge.common.util.ForgeDirection side)
Checks if this tile can connect to another tile
|
boolean |
doDrop() |
net.minecraftforge.fluids.FluidStack |
drain(net.minecraftforge.common.util.ForgeDirection from,
net.minecraftforge.fluids.FluidStack resource,
boolean doDrain) |
net.minecraftforge.fluids.FluidStack |
drain(net.minecraftforge.common.util.ForgeDirection from,
int maxDrain,
boolean doDrain) |
int |
extractEnergy(net.minecraftforge.common.util.ForgeDirection from,
int maxExtract,
boolean simulate)
Remove energy from an IEnergyProvider, internal distribution is left entirely to the IEnergyProvider.
|
int |
fill(net.minecraftforge.common.util.ForgeDirection from,
net.minecraftforge.fluids.FluidStack resource,
boolean doFill)
ITankContainer implementation *
|
Packet |
getBCDescriptionPacket() |
net.minecraft.block.Block |
getBlock() |
net.minecraft.block.Block |
getBlock(net.minecraftforge.common.util.ForgeDirection to) |
void |
getDebugInfo(java.util.List<java.lang.String> info,
net.minecraftforge.common.util.ForgeDirection side,
net.minecraft.item.ItemStack debugger,
net.minecraft.entity.player.EntityPlayer player)
Get the debug information from a tile entity as a list of strings,
usable with the BuildCraft Debugger.
|
net.minecraft.network.Packet |
getDescriptionPacket() |
int |
getEnergyStored(net.minecraftforge.common.util.ForgeDirection from)
Returns the amount of energy currently stored.
|
int |
getItemMetadata() |
int |
getMaxEnergyStored(net.minecraftforge.common.util.ForgeDirection from)
Returns the maximum amount of energy that can be stored.
|
double |
getMaxRenderDistanceSquared() |
net.minecraft.block.Block |
getNeighborBlock(net.minecraftforge.common.util.ForgeDirection dir) |
IPipe |
getNeighborPipe(net.minecraftforge.common.util.ForgeDirection dir) |
net.minecraft.tileentity.TileEntity |
getNeighborTile(net.minecraftforge.common.util.ForgeDirection dir) |
IPipe |
getPipe() |
int |
getPipeColor() |
IIconProvider |
getPipeIcons() |
PipePluggable |
getPipePluggable(net.minecraftforge.common.util.ForgeDirection side) |
IPipeTile.PipeType |
getPipeType() |
ISerializable |
getStateInstance(byte stateId)
called by the PacketHandler for each state contained in a StatePacket
|
net.minecraftforge.fluids.FluidTankInfo[] |
getTankInfo(net.minecraftforge.common.util.ForgeDirection from) |
net.minecraft.tileentity.TileEntity |
getTile(net.minecraftforge.common.util.ForgeDirection to) |
net.minecraft.tileentity.TileEntity |
getTile(net.minecraftforge.common.util.ForgeDirection to,
boolean forceUpdate) |
TileBuffer[] |
getTileCache() |
net.minecraft.world.World |
getWorld() |
boolean |
hasBlockingPluggable(net.minecraftforge.common.util.ForgeDirection side) |
boolean |
hasEnabledFacade(net.minecraftforge.common.util.ForgeDirection direction) |
boolean |
hasFacade(net.minecraftforge.common.util.ForgeDirection direction) |
boolean |
hasGate(net.minecraftforge.common.util.ForgeDirection direction) |
boolean |
hasPipePluggable(net.minecraftforge.common.util.ForgeDirection side) |
void |
initialize(Pipe<?> pipe) |
void |
initializeFromItemMetadata(int i) |
int |
injectItem(net.minecraft.item.ItemStack payload,
boolean doAdd,
net.minecraftforge.common.util.ForgeDirection from) |
int |
injectItem(net.minecraft.item.ItemStack payload,
boolean doAdd,
net.minecraftforge.common.util.ForgeDirection from,
EnumColor color)
Offers an ItemStack for 3addition to the pipe.
|
void |
invalidate() |
boolean |
isInitialized() |
boolean |
isPipeConnected(net.minecraftforge.common.util.ForgeDirection with)
True if the pipe is connected to the block/pipe in the specific direction
|
boolean |
isSolidOnSide(net.minecraftforge.common.util.ForgeDirection side) |
boolean |
isUseableByPlayer(net.minecraft.entity.player.EntityPlayer player) |
protected void |
notifyBlockChanged() |
void |
onChunkUnload() |
void |
readFromNBT(net.minecraft.nbt.NBTTagCompound nbt) |
void |
readGuiData(io.netty.buffer.ByteBuf data,
net.minecraft.entity.player.EntityPlayer sender) |
int |
receiveEnergy(net.minecraftforge.common.util.ForgeDirection from,
int maxReceive,
boolean simulate)
Add energy to an IEnergyReceiver, internal distribution is left entirely to the IEnergyReceiver.
|
protected void |
refreshRenderState()
PRECONDITION: worldObj must not be null
|
void |
scheduleNeighborChange() |
void |
scheduleRenderUpdate() |
void |
sendUpdateToClient() |
void |
setGate(Gate gate,
int direction) |
boolean |
setPipeColor(int color) |
boolean |
setPluggable(net.minecraftforge.common.util.ForgeDirection direction,
PipePluggable pluggable) |
boolean |
setPluggable(net.minecraftforge.common.util.ForgeDirection direction,
PipePluggable pluggable,
net.minecraft.entity.player.EntityPlayer player) |
boolean |
shouldRefresh(net.minecraft.block.Block oldBlock,
net.minecraft.block.Block newBlock,
int oldMeta,
int newMeta,
net.minecraft.world.World world,
int x,
int y,
int z) |
void |
updateEntity() |
void |
validate() |
void |
writeGuiData(io.netty.buffer.ByteBuf data) |
void |
writeToNBT(net.minecraft.nbt.NBTTagCompound nbt) |
int |
x() |
int |
y() |
int |
z() |
addMapping, canUpdate, createAndLoadEntity, func_145828_a, getBlockMetadata, getBlockType, getDistanceFrom, getRenderBoundingBox, getWorldObj, hasWorldObj, isInvalid, markDirty, onDataPacket, receiveClientEvent, setWorldObj, shouldRenderInPass, updateContainingBlockInfopublic boolean initialized
public final PipeRenderState renderState
public final PipePluggableState pluggableState
public final TileGenericPipe.CoreState coreState
public boolean[] pipeConnectionsBuffer
public Pipe pipe
public int redstoneInput
public int[] redstoneInputSide
protected boolean deletePipe
protected boolean sendClientUpdate
protected boolean blockNeighborChange
protected boolean refreshRenderState
protected boolean pipeBound
protected boolean resyncGateExpansions
protected boolean attachPluggables
protected TileGenericPipe.SideProperties sideProperties
public void writeToNBT(net.minecraft.nbt.NBTTagCompound nbt)
writeToNBT in class net.minecraft.tileentity.TileEntitypublic void readFromNBT(net.minecraft.nbt.NBTTagCompound nbt)
readFromNBT in class net.minecraft.tileentity.TileEntitypublic void invalidate()
invalidate in class net.minecraft.tileentity.TileEntitypublic void validate()
validate in class net.minecraft.tileentity.TileEntityprotected void notifyBlockChanged()
public void updateEntity()
updateEntity in class net.minecraft.tileentity.TileEntitypublic void initializeFromItemMetadata(int i)
public int getItemMetadata()
public int getPipeColor()
getPipeColor in interface IPipeTilepublic boolean setPipeColor(int color)
protected void refreshRenderState()
public void initialize(Pipe<?> pipe)
public boolean isInitialized()
public void scheduleNeighborChange()
scheduleNeighborChange in interface IPipeTilepublic boolean canInjectItems(net.minecraftforge.common.util.ForgeDirection from)
canInjectItems in interface IInjectablepublic int injectItem(net.minecraft.item.ItemStack payload,
boolean doAdd,
net.minecraftforge.common.util.ForgeDirection from,
EnumColor color)
IInjectableinjectItem in interface IInjectableinjectItem in interface IPipeTilepayload - ItemStack offered for addition. Do not manipulate this!doAdd - If false no actual addition should take place. Implementors
should simulate.from - Orientation the ItemStack is offered from.color - The color of the item to be added to the pipe, or null for no color.public int injectItem(net.minecraft.item.ItemStack payload,
boolean doAdd,
net.minecraftforge.common.util.ForgeDirection from)
injectItem in interface IPipeTilepublic IPipeTile.PipeType getPipeType()
getPipeType in interface IPipeTilepublic Packet getBCDescriptionPacket()
public net.minecraft.network.Packet getDescriptionPacket()
getDescriptionPacket in class net.minecraft.tileentity.TileEntitypublic void sendUpdateToClient()
public void blockRemoved(net.minecraftforge.common.util.ForgeDirection from)
blockRemoved in interface ITileBufferHolderpublic TileBuffer[] getTileCache()
public void blockCreated(net.minecraftforge.common.util.ForgeDirection from,
net.minecraft.block.Block block,
net.minecraft.tileentity.TileEntity tile)
blockCreated in interface ITileBufferHolderpublic net.minecraft.block.Block getBlock(net.minecraftforge.common.util.ForgeDirection to)
getBlock in interface ITileBufferHolderpublic net.minecraft.tileentity.TileEntity getTile(net.minecraftforge.common.util.ForgeDirection to)
getTile in interface ITileBufferHolderpublic net.minecraft.tileentity.TileEntity getTile(net.minecraftforge.common.util.ForgeDirection to,
boolean forceUpdate)
protected boolean canPipeConnect_internal(net.minecraft.tileentity.TileEntity with,
net.minecraftforge.common.util.ForgeDirection side)
protected boolean canPipeConnect(net.minecraft.tileentity.TileEntity with,
net.minecraftforge.common.util.ForgeDirection side)
with - - The other Tileside - - The orientation to get to the other tile ('with')public boolean hasBlockingPluggable(net.minecraftforge.common.util.ForgeDirection side)
hasBlockingPluggable in interface IPipeTilepublic boolean isPipeConnected(net.minecraftforge.common.util.ForgeDirection with)
IPipeTileisPipeConnected in interface IPipeTilepublic boolean doDrop()
doDrop in interface IDropControlInventorypublic void onChunkUnload()
onChunkUnload in class net.minecraft.tileentity.TileEntitypublic int fill(net.minecraftforge.common.util.ForgeDirection from,
net.minecraftforge.fluids.FluidStack resource,
boolean doFill)
fill in interface net.minecraftforge.fluids.IFluidHandlerpublic net.minecraftforge.fluids.FluidStack drain(net.minecraftforge.common.util.ForgeDirection from,
int maxDrain,
boolean doDrain)
drain in interface net.minecraftforge.fluids.IFluidHandlerpublic net.minecraftforge.fluids.FluidStack drain(net.minecraftforge.common.util.ForgeDirection from,
net.minecraftforge.fluids.FluidStack resource,
boolean doDrain)
drain in interface net.minecraftforge.fluids.IFluidHandlerpublic boolean canFill(net.minecraftforge.common.util.ForgeDirection from,
net.minecraftforge.fluids.Fluid fluid)
canFill in interface net.minecraftforge.fluids.IFluidHandlerpublic boolean canDrain(net.minecraftforge.common.util.ForgeDirection from,
net.minecraftforge.fluids.Fluid fluid)
canDrain in interface net.minecraftforge.fluids.IFluidHandlerpublic net.minecraftforge.fluids.FluidTankInfo[] getTankInfo(net.minecraftforge.common.util.ForgeDirection from)
getTankInfo in interface net.minecraftforge.fluids.IFluidHandlerpublic void scheduleRenderUpdate()
scheduleRenderUpdate in interface IPipeTilepublic boolean hasFacade(net.minecraftforge.common.util.ForgeDirection direction)
public boolean hasGate(net.minecraftforge.common.util.ForgeDirection direction)
public boolean setPluggable(net.minecraftforge.common.util.ForgeDirection direction,
PipePluggable pluggable)
public boolean setPluggable(net.minecraftforge.common.util.ForgeDirection direction,
PipePluggable pluggable,
net.minecraft.entity.player.EntityPlayer player)
public boolean hasEnabledFacade(net.minecraftforge.common.util.ForgeDirection direction)
public void setGate(Gate gate, int direction)
public IIconProvider getPipeIcons()
public ISerializable getStateInstance(byte stateId)
ISyncedTilegetStateInstance in interface ISyncedTilepublic void afterStateUpdated(byte stateId)
ISyncedTileafterStateUpdated in interface ISyncedTilepublic double getMaxRenderDistanceSquared()
getMaxRenderDistanceSquared in class net.minecraft.tileentity.TileEntitypublic boolean shouldRefresh(net.minecraft.block.Block oldBlock,
net.minecraft.block.Block newBlock,
int oldMeta,
int newMeta,
net.minecraft.world.World world,
int x,
int y,
int z)
shouldRefresh in class net.minecraft.tileentity.TileEntitypublic boolean isSolidOnSide(net.minecraftforge.common.util.ForgeDirection side)
isSolidOnSide in interface ISolidSideTilepublic PipePluggable getPipePluggable(net.minecraftforge.common.util.ForgeDirection side)
getPipePluggable in interface IPipeTilepublic boolean hasPipePluggable(net.minecraftforge.common.util.ForgeDirection side)
hasPipePluggable in interface IPipeTilepublic net.minecraft.block.Block getBlock()
public net.minecraft.world.World getWorld()
getWorld in interface IPipeTilegetWorld in interface IGuiReturnHandlerpublic boolean isUseableByPlayer(net.minecraft.entity.player.EntityPlayer player)
public void writeGuiData(io.netty.buffer.ByteBuf data)
writeGuiData in interface IGuiReturnHandlerpublic void readGuiData(io.netty.buffer.ByteBuf data,
net.minecraft.entity.player.EntityPlayer sender)
readGuiData in interface IGuiReturnHandlerpublic boolean canConnectEnergy(net.minecraftforge.common.util.ForgeDirection from)
IEnergyConnectioncanConnectEnergy in interface IEnergyConnectionpublic int receiveEnergy(net.minecraftforge.common.util.ForgeDirection from,
int maxReceive,
boolean simulate)
IEnergyHandlerreceiveEnergy in interface IEnergyHandlerreceiveEnergy in interface IEnergyReceiverfrom - Orientation the energy is received from.maxReceive - Maximum amount of energy to receive.simulate - If TRUE, the charge will only be simulated.public int extractEnergy(net.minecraftforge.common.util.ForgeDirection from,
int maxExtract,
boolean simulate)
IEnergyHandlerextractEnergy in interface IEnergyHandlerextractEnergy in interface IEnergyProviderfrom - Orientation the energy is extracted from.maxExtract - Maximum amount of energy to extract.simulate - If TRUE, the extraction will only be simulated.public int getEnergyStored(net.minecraftforge.common.util.ForgeDirection from)
IEnergyHandlergetEnergyStored in interface IEnergyHandlergetEnergyStored in interface IEnergyProvidergetEnergyStored in interface IEnergyReceiverpublic int getMaxEnergyStored(net.minecraftforge.common.util.ForgeDirection from)
IEnergyHandlergetMaxEnergyStored in interface IEnergyHandlergetMaxEnergyStored in interface IEnergyProvidergetMaxEnergyStored in interface IEnergyReceiverpublic net.minecraft.block.Block getNeighborBlock(net.minecraftforge.common.util.ForgeDirection dir)
getNeighborBlock in interface IPipeTilepublic net.minecraft.tileentity.TileEntity getNeighborTile(net.minecraftforge.common.util.ForgeDirection dir)
getNeighborTile in interface IPipeTilepublic IPipe getNeighborPipe(net.minecraftforge.common.util.ForgeDirection dir)
getNeighborPipe in interface IPipeTilepublic boolean canConnectRedstoneEngine(net.minecraftforge.common.util.ForgeDirection side)
IRedstoneEngineReceivercanConnectRedstoneEngine in interface IRedstoneEngineReceiverpublic void getDebugInfo(java.util.List<java.lang.String> info,
net.minecraftforge.common.util.ForgeDirection side,
net.minecraft.item.ItemStack debugger,
net.minecraft.entity.player.EntityPlayer player)
IDebuggablegetDebugInfo in interface IDebuggableinfo - The List debug strings should be output to.side - The side of the tile.debugger - The debugger ItemStack used.player - The player querying the debug information.