public class PipePowerWood extends Pipe<PipeTransportPower> implements IPowerReceptor, IPipeTransportPowerHook, IEnergyHandler
| Modifier and Type | Field and Description |
|---|---|
protected RFBattery |
battery |
boolean[] |
powerSources |
protected int |
solidIconIndex |
protected int |
standardIconIndex |
| Constructor and Description |
|---|
PipePowerWood(net.minecraft.item.Item item) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canConnectEnergy(net.minecraftforge.common.util.ForgeDirection from)
Returns TRUE if the TileEntity can connect on a given side.
|
void |
doWork(PowerHandler workProvider)
Call back from the PowerHandler that is called when the stored power
exceeds the activation power.
|
int |
extractEnergy(net.minecraftforge.common.util.ForgeDirection from,
int maxExtract,
boolean simulate)
Remove energy from an IEnergyHandler, internal distribution is left entirely to the IEnergyHandler.
|
int |
getEnergyStored(net.minecraftforge.common.util.ForgeDirection from)
Returns the amount of energy currently stored.
|
int |
getIconIndex(net.minecraftforge.common.util.ForgeDirection direction)
Should return the index in the array returned by GetTextureIcons() for a
specified direction
|
IIconProvider |
getIconProvider()
Should return the IIconProvider that provides icons for this pipe
|
int |
getMaxEnergyStored(net.minecraftforge.common.util.ForgeDirection from)
Returns the maximum amount of energy that can be stored.
|
PowerHandler.PowerReceiver |
getPowerReceiver(net.minecraftforge.common.util.ForgeDirection side)
Get the PowerReceiver for this side of the block.
|
boolean |
isPowerSource(net.minecraft.tileentity.TileEntity tile,
net.minecraftforge.common.util.ForgeDirection from) |
void |
readFromNBT(net.minecraft.nbt.NBTTagCompound data) |
int |
receiveEnergy(net.minecraftforge.common.util.ForgeDirection from,
int val)
Override default behavior on receiving energy into the pipe.
|
int |
receiveEnergy(net.minecraftforge.common.util.ForgeDirection from,
int maxReceive,
boolean simulate)
Add energy to an IEnergyHandler, internal distribution is left entirely to the IEnergyHandler.
|
int |
requestEnergy(net.minecraftforge.common.util.ForgeDirection from,
int amount)
Override default requested power.
|
boolean |
requestsPower() |
void |
updateEntity() |
void |
writeToNBT(net.minecraft.nbt.NBTTagCompound data) |
actionsActivated, blockActivated, canConnectRedstone, canPipeConnect, computeItemDrop, doDrop, dropContents, dropItem, getActions, getContainer, getDroppedItems, getGate, getIconIndexForItem, getMaxRedstoneOutput, getOpenOrientation, getTile, getWorld, handlePipeEvent, hasGate, hasGate, initialize, inputOpen, invalidate, isIndirectlyPoweringTo, isPoweringTo, isWireActive, isWireConnectedTo, isWired, needsInit, notifyBlocksOfNeighborChange, onBlockPlaced, onBlockPlacedBy, onChunkUnload, onEntityCollidedWithBlock, onNeighborBlockChange, outputOpen, randomDisplayTick, resetGates, resolveActions, setTile, updateNeighbors, updateSignalState, validate, x, y, zclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetWorldpublic final boolean[] powerSources
protected int standardIconIndex
protected int solidIconIndex
protected RFBattery battery
public IIconProvider getIconProvider()
PipegetIconProvider in class Pipe<PipeTransportPower>public int getIconIndex(net.minecraftforge.common.util.ForgeDirection direction)
PipegetIconIndex in class Pipe<PipeTransportPower>direction - - The direction for which the indexed should be
rendered. Unknown for pipe centerpublic void updateEntity()
updateEntity in class Pipe<PipeTransportPower>public boolean requestsPower()
public void writeToNBT(net.minecraft.nbt.NBTTagCompound data)
writeToNBT in class Pipe<PipeTransportPower>public void readFromNBT(net.minecraft.nbt.NBTTagCompound data)
readFromNBT in class Pipe<PipeTransportPower>public int receiveEnergy(net.minecraftforge.common.util.ForgeDirection from,
int val)
IPipeTransportPowerHookreceiveEnergy in interface IPipeTransportPowerHookpublic int requestEnergy(net.minecraftforge.common.util.ForgeDirection from,
int amount)
IPipeTransportPowerHookrequestEnergy in interface IPipeTransportPowerHookpublic boolean isPowerSource(net.minecraft.tileentity.TileEntity tile,
net.minecraftforge.common.util.ForgeDirection from)
public PowerHandler.PowerReceiver getPowerReceiver(net.minecraftforge.common.util.ForgeDirection side)
IPowerReceptorgetPowerReceiver in interface IPowerReceptorpublic void doWork(PowerHandler workProvider)
IPowerReceptordoWork in interface IPowerReceptorpublic 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 IEnergyHandlerfrom - 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 IEnergyHandlerfrom - 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 IEnergyHandlerpublic int getMaxEnergyStored(net.minecraftforge.common.util.ForgeDirection from)
IEnergyHandlergetMaxEnergyStored in interface IEnergyHandler