public abstract class TileEngine extends TileBuildCraft implements IPowerReceptor, IPowerEmitter, IOverrideDefaultTriggers, IPipeConnection, IEnergyHandler
| Modifier and Type | Class and Description |
|---|---|
static class |
TileEngine.EnergyStage |
IPipeConnection.ConnectOverride| Modifier and Type | Field and Description |
|---|---|
static net.minecraft.util.ResourceLocation[] |
BASE_TEXTURES |
static net.minecraft.util.ResourceLocation[] |
CHAMBER_TEXTURES |
int |
currentOutput |
int |
energy |
TileEngine.EnergyStage |
energyStage |
float |
heat |
static float |
IDEAL_HEAT |
boolean |
isRedstonePowered |
protected boolean |
lastPower |
static float |
MAX_HEAT |
static float |
MIN_HEAT |
net.minecraftforge.common.util.ForgeDirection |
orientation |
protected PowerHandler |
powerHandler |
float |
progress |
protected int |
progressPart |
static net.minecraft.util.ResourceLocation |
TRUNK_BLUE_TEXTURE |
static net.minecraft.util.ResourceLocation |
TRUNK_GREEN_TEXTURE |
static net.minecraft.util.ResourceLocation |
TRUNK_RED_TEXTURE |
static net.minecraft.util.ResourceLocation[] |
TRUNK_TEXTURES |
static net.minecraft.util.ResourceLocation |
TRUNK_YELLOW_TEXTURE |
| Constructor and Description |
|---|
TileEngine() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEnergy(int addition) |
protected void |
burn() |
abstract int |
calculateCurrentOutput() |
boolean |
canConnectEnergy(net.minecraftforge.common.util.ForgeDirection from)
Returns TRUE if the TileEntity can connect on a given side.
|
boolean |
canEmitPowerFrom(net.minecraftforge.common.util.ForgeDirection side) |
void |
checkRedstonePower() |
protected TileEngine.EnergyStage |
computeEnergyStage() |
void |
doWork(PowerHandler workProvider)
Call back from the PowerHandler that is called when the stored power
exceeds the activation power.
|
protected void |
engineUpdate() |
abstract float |
explosionRange() |
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 |
extractEnergy(int min,
int energyMax,
boolean doExtract) |
abstract net.minecraft.util.ResourceLocation |
getBaseTexture() |
abstract net.minecraft.util.ResourceLocation |
getChamberTexture() |
double |
getEnergyLevel() |
TileEngine.EnergyStage |
getEnergyStage() |
int |
getEnergyStored() |
int |
getEnergyStored(net.minecraftforge.common.util.ForgeDirection from)
Returns the amount of energy currently stored.
|
void |
getGUINetworkData(int id,
int value) |
float |
getHeat() |
float |
getHeatLevel() |
float |
getIdealHeatLevel() |
abstract int |
getMaxEnergy() |
int |
getMaxEnergyStored(net.minecraftforge.common.util.ForgeDirection from)
Returns the maximum amount of energy that can be stored.
|
float |
getPistonSpeed() |
PowerHandler.PowerReceiver |
getPowerReceiver(net.minecraftforge.common.util.ForgeDirection side)
Get the PowerReceiver for this side of the block.
|
TileBuffer |
getTileBuffer(net.minecraftforge.common.util.ForgeDirection side) |
java.util.LinkedList<ITrigger> |
getTriggers() |
net.minecraft.util.ResourceLocation |
getTrunkTexture(TileEngine.EnergyStage stage) |
void |
initialize() |
void |
invalidate() |
boolean |
isActive() |
abstract boolean |
isBurning() |
boolean |
isOrientationValid() |
boolean |
isPoweredTile(net.minecraft.tileentity.TileEntity tile,
net.minecraftforge.common.util.ForgeDirection side) |
abstract int |
maxEnergyExtracted() |
abstract int |
maxEnergyReceived() |
int |
minEnergyReceived() |
boolean |
onBlockActivated(net.minecraft.entity.player.EntityPlayer player,
net.minecraftforge.common.util.ForgeDirection side) |
void |
onNeighborUpdate() |
IPipeConnection.ConnectOverride |
overridePipeConnection(IPipeTile.PipeType type,
net.minecraftforge.common.util.ForgeDirection with)
Allows you to override pipe connection logic.
|
void |
readFromNBT(net.minecraft.nbt.NBTTagCompound data) |
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.
|
void |
sendGUINetworkData(ContainerEngine containerEngine,
net.minecraft.inventory.ICrafting iCrafting) |
protected void |
sendPower() |
protected void |
setPumping(boolean isActive) |
boolean |
switchOrientation(boolean preferPipe) |
void |
updateEntity() |
void |
updateHeatLevel() |
void |
validate() |
void |
writeToNBT(net.minecraft.nbt.NBTTagCompound data) |
destroy, equals, getBattery, getDescriptionPacket, getOwner, getPacketPayload, getUpdatePacket, getWorld, handleDescriptionPacket, handleUpdatePacket, hashCode, onBlockPlacedBy, postPacketHandling, sendNetworkUpdate, setBatteryaddMapping, canUpdate, createAndLoadEntity, func_145828_a, getBlockMetadata, getBlockType, getDistanceFrom, getMaxRenderDistanceSquared, getRenderBoundingBox, getWorldObj, hasWorldObj, isInvalid, markDirty, onChunkUnload, onDataPacket, receiveClientEvent, setWorldObj, shouldRefresh, shouldRenderInPass, updateContainingBlockInfoclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetWorldpublic static final net.minecraft.util.ResourceLocation[] BASE_TEXTURES
public static final net.minecraft.util.ResourceLocation[] CHAMBER_TEXTURES
public static final net.minecraft.util.ResourceLocation[] TRUNK_TEXTURES
public static final net.minecraft.util.ResourceLocation TRUNK_BLUE_TEXTURE
public static final net.minecraft.util.ResourceLocation TRUNK_GREEN_TEXTURE
public static final net.minecraft.util.ResourceLocation TRUNK_YELLOW_TEXTURE
public static final net.minecraft.util.ResourceLocation TRUNK_RED_TEXTURE
public static final float MIN_HEAT
public static final float IDEAL_HEAT
public static final float MAX_HEAT
public int currentOutput
public boolean isRedstonePowered
public float progress
public int energy
public float heat
public TileEngine.EnergyStage energyStage
public net.minecraftforge.common.util.ForgeDirection orientation
protected int progressPart
protected boolean lastPower
protected PowerHandler powerHandler
public void initialize()
initialize in class TileBuildCraftpublic abstract net.minecraft.util.ResourceLocation getBaseTexture()
public abstract net.minecraft.util.ResourceLocation getChamberTexture()
public net.minecraft.util.ResourceLocation getTrunkTexture(TileEngine.EnergyStage stage)
public boolean onBlockActivated(net.minecraft.entity.player.EntityPlayer player,
net.minecraftforge.common.util.ForgeDirection side)
public double getEnergyLevel()
protected TileEngine.EnergyStage computeEnergyStage()
public final TileEngine.EnergyStage getEnergyStage()
public void updateHeatLevel()
public float getHeatLevel()
public float getIdealHeatLevel()
public float getHeat()
public float getPistonSpeed()
public void updateEntity()
updateEntity in class TileBuildCraftprotected void sendPower()
protected void burn()
protected void engineUpdate()
public boolean isActive()
protected final void setPumping(boolean isActive)
public boolean isOrientationValid()
public boolean switchOrientation(boolean preferPipe)
public TileBuffer getTileBuffer(net.minecraftforge.common.util.ForgeDirection side)
public void invalidate()
invalidate in class TileBuildCraftpublic void validate()
validate in class net.minecraft.tileentity.TileEntitypublic void readFromNBT(net.minecraft.nbt.NBTTagCompound data)
readFromNBT in class TileBuildCraftpublic void writeToNBT(net.minecraft.nbt.NBTTagCompound data)
writeToNBT in class TileBuildCraftpublic void getGUINetworkData(int id,
int value)
public void sendGUINetworkData(ContainerEngine containerEngine, net.minecraft.inventory.ICrafting iCrafting)
public abstract boolean isBurning()
public PowerHandler.PowerReceiver getPowerReceiver(net.minecraftforge.common.util.ForgeDirection side)
IPowerReceptorgetPowerReceiver in interface IPowerReceptorpublic void doWork(PowerHandler workProvider)
IPowerReceptordoWork in interface IPowerReceptorpublic void addEnergy(int addition)
public int extractEnergy(int min,
int energyMax,
boolean doExtract)
public boolean isPoweredTile(net.minecraft.tileentity.TileEntity tile,
net.minecraftforge.common.util.ForgeDirection side)
public abstract int getMaxEnergy()
public int minEnergyReceived()
public abstract int maxEnergyReceived()
public abstract int maxEnergyExtracted()
public abstract float explosionRange()
public int getEnergyStored()
public abstract int calculateCurrentOutput()
public java.util.LinkedList<ITrigger> getTriggers()
getTriggers in interface IOverrideDefaultTriggerspublic IPipeConnection.ConnectOverride overridePipeConnection(IPipeTile.PipeType type, net.minecraftforge.common.util.ForgeDirection with)
IPipeConnectionoverridePipeConnection in interface IPipeConnectionpublic boolean canEmitPowerFrom(net.minecraftforge.common.util.ForgeDirection side)
canEmitPowerFrom in interface IPowerEmitterpublic void checkRedstonePower()
public void onNeighborUpdate()
public int receiveEnergy(net.minecraftforge.common.util.ForgeDirection from,
int maxReceive,
boolean simulate)
IEnergyHandlerreceiveEnergy in interface IEnergyHandlerreceiveEnergy in class TileBuildCraftfrom - 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 class TileBuildCraftfrom - 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 class TileBuildCraftpublic int getMaxEnergyStored(net.minecraftforge.common.util.ForgeDirection from)
IEnergyHandlergetMaxEnergyStored in interface IEnergyHandlergetMaxEnergyStored in class TileBuildCraftpublic boolean canConnectEnergy(net.minecraftforge.common.util.ForgeDirection from)
IEnergyConnectioncanConnectEnergy in interface IEnergyConnectioncanConnectEnergy in class TileBuildCraft