public abstract class TileEngine extends TileBuildCraft implements IPipeConnection, IEnergyHandler, IEngine, IHeatable
| 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 |
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_OVERHEAT_TEXTURE |
static net.minecraft.util.ResourceLocation |
TRUNK_RED_TEXTURE |
static net.minecraft.util.ResourceLocation[] |
TRUNK_TEXTURES |
static net.minecraft.util.ResourceLocation |
TRUNK_YELLOW_TEXTURE |
cache, guiWatchers, mode| 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 |
canReceiveFromEngine(net.minecraftforge.common.util.ForgeDirection side)
Returns true if the engine wants to receive power from
another engine on this side.
|
void |
checkRedstonePower() |
protected TileEngine.EnergyStage |
computeEnergyStage() |
protected void |
engineUpdate() |
int |
extractEnergy(net.minecraftforge.common.util.ForgeDirection from,
int maxExtract,
boolean simulate)
If you want to use this, implement IEnergyProvider.
|
int |
extractEnergy(int energyMax,
boolean doExtract) |
abstract net.minecraft.util.ResourceLocation |
getBaseTexture() |
abstract net.minecraft.util.ResourceLocation |
getChamberTexture() |
double |
getCurrentHeatValue() |
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 |
getHeatLevel() |
double |
getIdealHeatValue() |
abstract int |
getMaxEnergy() |
int |
getMaxEnergyStored(net.minecraftforge.common.util.ForgeDirection from)
Returns the maximum amount of energy that can be stored.
|
double |
getMaxHeatValue() |
double |
getMinHeatValue() |
float |
getPistonSpeed() |
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() |
void |
overheat() |
IPipeConnection.ConnectOverride |
overridePipeConnection(IPipeTile.PipeType type,
net.minecraftforge.common.util.ForgeDirection with)
Allows you to override pipe connection logic.
|
void |
readData(io.netty.buffer.ByteBuf stream)
Deserializes the state from the stream
|
void |
readFromNBT(net.minecraft.nbt.NBTTagCompound data) |
int |
receiveEnergyFromEngine(net.minecraftforge.common.util.ForgeDirection side,
int amount,
boolean simulate)
Receives energy from an engine.
|
void |
sendGUINetworkData(ContainerEngine containerEngine,
net.minecraft.inventory.ICrafting iCrafting) |
protected void |
sendPower() |
double |
setHeatValue(double value)
Set the heat of the tile.
|
protected void |
setPumping(boolean isActive) |
boolean |
switchOrientation(boolean preferPipe) |
void |
updateEntity() |
void |
updateHeat() |
void |
validate() |
void |
writeData(io.netty.buffer.ByteBuf stream)
Serializes the state to the stream
|
void |
writeToNBT(net.minecraft.nbt.NBTTagCompound data) |
addGuiWatcher, destroy, equals, getBattery, getBlock, getControlMode, getDescriptionPacket, getOwner, getPacketUpdate, getTile, hashCode, onBlockPlacedBy, receiveEnergy, removeGuiWatcher, sendNetworkUpdate, setBattery, setControlModeaddMapping, 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, waitreceiveEnergypublic 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 net.minecraft.util.ResourceLocation TRUNK_OVERHEAT_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
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 overheat()
public void updateHeat()
public float getHeatLevel()
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 void invalidate()
invalidate in class TileBuildCraftpublic void validate()
validate in class TileBuildCraftpublic void readFromNBT(net.minecraft.nbt.NBTTagCompound data)
readFromNBT in class TileBuildCraftpublic void writeToNBT(net.minecraft.nbt.NBTTagCompound data)
writeToNBT in class TileBuildCraftpublic void readData(io.netty.buffer.ByteBuf stream)
ISerializablereadData in interface ISerializablereadData in class TileBuildCraftpublic void writeData(io.netty.buffer.ByteBuf stream)
ISerializablewriteData in interface ISerializablewriteData in class TileBuildCraftpublic void getGUINetworkData(int id,
int value)
public void sendGUINetworkData(ContainerEngine containerEngine, net.minecraft.inventory.ICrafting iCrafting)
public abstract boolean isBurning()
public void addEnergy(int addition)
public int extractEnergy(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 int getEnergyStored()
public abstract int calculateCurrentOutput()
public IPipeConnection.ConnectOverride overridePipeConnection(IPipeTile.PipeType type, net.minecraftforge.common.util.ForgeDirection with)
IPipeConnectionoverridePipeConnection in interface IPipeConnectionpublic void checkRedstonePower()
public void onNeighborUpdate()
public int extractEnergy(net.minecraftforge.common.util.ForgeDirection from,
int maxExtract,
boolean simulate)
TileBuildCraftextractEnergy in interface IEnergyHandlerextractEnergy in interface IEnergyProviderextractEnergy 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 interface IEnergyProvidergetEnergyStored in interface IEnergyReceivergetEnergyStored in class TileBuildCraftpublic int getMaxEnergyStored(net.minecraftforge.common.util.ForgeDirection from)
IEnergyHandlergetMaxEnergyStored in interface IEnergyHandlergetMaxEnergyStored in interface IEnergyProvidergetMaxEnergyStored in interface IEnergyReceivergetMaxEnergyStored in class TileBuildCraftpublic boolean canConnectEnergy(net.minecraftforge.common.util.ForgeDirection from)
IEnergyConnectioncanConnectEnergy in interface IEnergyConnectioncanConnectEnergy in class TileBuildCraftpublic boolean canReceiveFromEngine(net.minecraftforge.common.util.ForgeDirection side)
IEnginecanReceiveFromEngine in interface IEnginepublic int receiveEnergyFromEngine(net.minecraftforge.common.util.ForgeDirection side,
int amount,
boolean simulate)
IEngineIEnergyHandler.receiveEnergy(ForgeDirection, int, boolean)receiveEnergyFromEngine in interface IEngineside - The side the engine is receiving energy from.amount - The amount of energy given to the engine.simulate - True if the energy should not actually be added.public double getMinHeatValue()
getMinHeatValue in interface IHeatablepublic double getIdealHeatValue()
getIdealHeatValue in interface IHeatablepublic double getMaxHeatValue()
getMaxHeatValue in interface IHeatablepublic double getCurrentHeatValue()
getCurrentHeatValue in interface IHeatablepublic double setHeatValue(double value)
IHeatablesetHeatValue in interface IHeatablevalue - Heat value, in degrees.