public abstract class TileBC_Neptune extends net.minecraft.tileentity.TileEntity implements IPayloadReceiver, IAdvDebugTarget, IPlayerOwned
Modifier and Type | Field and Description |
---|---|
protected CapabilityHelper |
caps |
static boolean |
DEBUG |
protected DeltaManager |
deltaManager |
protected static IdAllocator |
IDS |
protected ItemHandlerManager |
itemManager |
static int |
NET_ADV_DEBUG
Used for detailed debugging for inspecting every part of the current tile.
|
static int |
NET_ADV_DEBUG_DISABLE |
static int |
NET_GUI_DATA
Used for sending all data in the GUI.
|
static int |
NET_GUI_DELTA_CLEAR |
static int |
NET_GUI_DELTA_SINGLE |
static int |
NET_GUI_TICK
Used for sending the data that would normally be sent with
Container.detectAndSendChanges() . |
static int |
NET_REDRAW
Used to tell the client to redraw the block.
|
static int |
NET_REN_DELTA_CLEAR |
static int |
NET_REN_DELTA_SINGLE |
static int |
NET_RENDER_DATA
Used for sending all data used for rendering the tile on a client.
|
protected TankManager |
tankManager |
Constructor and Description |
---|
TileBC_Neptune() |
Modifier and Type | Method and Description |
---|---|
void |
addDrops(net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> toDrop,
int fortune)
Called whenever
Block.getDrops(NonNullList, IBlockAccess, BlockPos, IBlockState, int) , or
onRemove() is called (by default). |
boolean |
canEditOther(net.minecraft.util.math.BlockPos other) |
boolean |
canInteractWith(net.minecraft.entity.player.EntityPlayer player) |
boolean |
cannotUpdate()
Checks to see if this tile can update.
|
boolean |
canPlayerEdit(net.minecraft.entity.player.EntityPlayer player) |
void |
createAndSendGuiMessage(int id,
net.minecraft.entity.player.EntityPlayerMP player,
IPayloadWriter writer) |
void |
createAndSendGuiMessage(int id,
IPayloadWriter writer) |
void |
createAndSendMessage(int id,
net.minecraft.entity.player.EntityPlayerMP player,
IPayloadWriter writer) |
void |
createAndSendMessage(int id,
IPayloadWriter writer) |
MessageUpdateTile |
createMessage(int id,
IPayloadWriter writer) |
MessageUpdateTile |
createNetworkUpdate(int id) |
void |
disableDebugging()
Called when the current debug target changes from this to something else (or to nothing).
|
boolean |
doesExistInWorld()
Called every tick on the server to see if this still exists in the world.
|
void |
enableDebugging() |
<T> T |
getCapability(net.minecraftforge.common.capabilities.Capability<T> capability,
net.minecraft.util.EnumFacing facing) |
net.minecraft.block.state.IBlockState |
getCurrentState() |
net.minecraft.block.state.IBlockState |
getCurrentStateForBlock(net.minecraft.block.Block expectedBlock) |
DetachedRenderer.IDetachedRenderer |
getDebugRenderer()
Called on the client to actually render off the target.
|
IdAllocator |
getIdAllocator() |
net.minecraft.block.state.IBlockState |
getLocalState(net.minecraft.util.math.BlockPos pos) |
net.minecraft.tileentity.TileEntity |
getLocalTile(net.minecraft.util.math.BlockPos pos) |
net.minecraft.block.state.IBlockState |
getNeighbourState(net.minecraft.util.EnumFacing offset) |
net.minecraft.tileentity.TileEntity |
getNeighbourTile(net.minecraft.util.EnumFacing offset) |
net.minecraft.block.state.IBlockState |
getOffsetState(net.minecraft.util.math.Vec3i offset) |
net.minecraft.tileentity.TileEntity |
getOffsetTile(net.minecraft.util.math.Vec3i offset) |
com.mojang.authlib.GameProfile |
getOwner() |
PermissionUtil.PermissionBlock |
getPermBlock() |
net.minecraft.network.play.server.SPacketUpdateTileEntity |
getUpdatePacket() |
net.minecraft.nbt.NBTTagCompound |
getUpdateTag() |
void |
handleUpdateTag(net.minecraft.nbt.NBTTagCompound tag) |
boolean |
hasCapability(net.minecraftforge.common.capabilities.Capability<?> capability,
net.minecraft.util.EnumFacing facing) |
boolean |
isBeingDebugged() |
protected void |
migrateOldNBT(int version,
net.minecraft.nbt.NBTTagCompound nbt) |
boolean |
onActivated(net.minecraft.entity.player.EntityPlayer player,
net.minecraft.util.EnumHand hand,
net.minecraft.util.EnumFacing facing,
float hitX,
float hitY,
float hitZ) |
void |
onDataPacket(net.minecraft.network.NetworkManager net,
net.minecraft.network.play.server.SPacketUpdateTileEntity pkt) |
void |
onExplode(net.minecraft.world.Explosion explosion)
Called whenever the block holding this tile is exploded.
|
void |
onNeighbourBlockChanged(net.minecraft.block.Block block,
net.minecraft.util.math.BlockPos nehighbour) |
void |
onPlacedBy(net.minecraft.entity.EntityLivingBase placer,
net.minecraft.item.ItemStack stack) |
void |
onPlayerClose(net.minecraft.entity.player.EntityPlayer player) |
void |
onPlayerOpen(net.minecraft.entity.player.EntityPlayer player) |
void |
onRemove()
Called whenever the block is removed.
|
protected void |
onSlotChange(net.minecraftforge.items.IItemHandlerModifiable handler,
int slot,
net.minecraft.item.ItemStack before,
net.minecraft.item.ItemStack after) |
void |
readFromNBT(net.minecraft.nbt.NBTTagCompound nbt) |
void |
readPayload(int id,
PacketBufferBC buffer,
net.minecraftforge.fml.relauncher.Side side,
net.minecraftforge.fml.common.network.simpleimpl.MessageContext ctx) |
net.minecraftforge.fml.common.network.simpleimpl.IMessage |
receivePayload(net.minecraftforge.fml.common.network.simpleimpl.MessageContext ctx,
PacketBufferBC buffer) |
void |
redrawBlock()
Tells MC to redraw this block.
|
void |
sendDebugState()
Called every tick on the server to send all the debug information to the client.
|
void |
sendNetworkGuiTick(net.minecraft.entity.player.EntityPlayer player) |
void |
sendNetworkGuiUpdate(int id) |
void |
sendNetworkUpdate(int id)
Sends a network update update of the specified ID.
|
void |
sendNetworkUpdate(int id,
net.minecraft.entity.player.EntityPlayer target) |
protected void |
setWorldCreate(net.minecraft.world.World world) |
boolean |
shouldRefresh(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState oldState,
net.minecraft.block.state.IBlockState newState) |
void |
writePayload(int id,
PacketBufferBC buffer,
net.minecraftforge.fml.relauncher.Side side) |
net.minecraft.nbt.NBTTagCompound |
writeToNBT(net.minecraft.nbt.NBTTagCompound nbt) |
addInfoToCrashReport, canRenderBreaking, create, deserializeNBT, getBlockMetadata, getBlockType, getDisplayName, getDistanceSq, getKey, getMaxRenderDistanceSquared, getPos, getRenderBoundingBox, getTileData, getWorld, hasFastRenderer, hasWorld, invalidate, isInvalid, markDirty, mirror, onChunkUnload, onLoad, onlyOpsCanSetNbt, receiveClientEvent, register, restrictNBTCopy, rotate, serializeNBT, setPos, setWorld, shouldRenderInPass, updateContainingBlockInfo, validate
public static final boolean DEBUG
protected static final IdAllocator IDS
public static final int NET_RENDER_DATA
public static final int NET_GUI_DATA
NET_RENDER_DATA
that is
shown in the GUI.public static final int NET_GUI_TICK
Container.detectAndSendChanges()
. Note that
if no bytes are written then the update message won't be sent. You should detect if any changes have been made to
the gui since the last tick, so you don't resend duplicate information if nothing has changed by the next
tick.public static final int NET_REN_DELTA_SINGLE
public static final int NET_REN_DELTA_CLEAR
public static final int NET_GUI_DELTA_SINGLE
public static final int NET_GUI_DELTA_CLEAR
public static final int NET_ADV_DEBUG
public static final int NET_ADV_DEBUG_DISABLE
public static final int NET_REDRAW
protected final CapabilityHelper caps
protected final ItemHandlerManager itemManager
protected final TankManager tankManager
protected final DeltaManager deltaManager
public final net.minecraft.block.state.IBlockState getCurrentState()
@Nullable public final net.minecraft.block.state.IBlockState getCurrentStateForBlock(net.minecraft.block.Block expectedBlock)
public final net.minecraft.block.state.IBlockState getNeighbourState(net.minecraft.util.EnumFacing offset)
public final net.minecraft.block.state.IBlockState getOffsetState(net.minecraft.util.math.Vec3i offset)
offset
- The position of the IBlockState
, relative to this TileEntity.getPos()
.public final net.minecraft.block.state.IBlockState getLocalState(net.minecraft.util.math.BlockPos pos)
pos
- The absolute position of the IBlockState
.public final net.minecraft.tileentity.TileEntity getNeighbourTile(net.minecraft.util.EnumFacing offset)
public final net.minecraft.tileentity.TileEntity getOffsetTile(net.minecraft.util.math.Vec3i offset)
offset
- The position of the TileEntity
to retrieve, relative to this
TileEntity.getPos()
.public final net.minecraft.tileentity.TileEntity getLocalTile(net.minecraft.util.math.BlockPos pos)
pos
- The absolute position of the TileEntity
.public IdAllocator getIdAllocator()
IdAllocator
that allocates all ID's for this class, and its parent classes. All subclasses
should override this if they allocate their own ids after calling
IdAllocator.makeChild(String)
public boolean cannotUpdate()
public boolean shouldRefresh(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, net.minecraft.block.state.IBlockState oldState, net.minecraft.block.state.IBlockState newState)
shouldRefresh
in class net.minecraft.tileentity.TileEntity
public void onExplode(net.minecraft.world.Explosion explosion)
Block.onBlockExploded(World, BlockPos, Explosion)
public void onRemove()
onExplode(Explosion)
, and
Block.breakBlock(World, BlockPos, IBlockState)
public void addDrops(net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> toDrop, int fortune)
Block.getDrops(NonNullList, IBlockAccess, BlockPos, IBlockState, int)
, or
onRemove()
is called (by default).public void onPlacedBy(net.minecraft.entity.EntityLivingBase placer, net.minecraft.item.ItemStack stack)
public void onPlayerOpen(net.minecraft.entity.player.EntityPlayer player)
public void onPlayerClose(net.minecraft.entity.player.EntityPlayer player)
public boolean onActivated(net.minecraft.entity.player.EntityPlayer player, net.minecraft.util.EnumHand hand, net.minecraft.util.EnumFacing facing, float hitX, float hitY, float hitZ)
public void onNeighbourBlockChanged(net.minecraft.block.Block block, net.minecraft.util.math.BlockPos nehighbour)
public final boolean hasCapability(@Nonnull net.minecraftforge.common.capabilities.Capability<?> capability, net.minecraft.util.EnumFacing facing)
hasCapability
in interface net.minecraftforge.common.capabilities.ICapabilityProvider
hasCapability
in class net.minecraft.tileentity.TileEntity
public <T> T getCapability(@Nonnull net.minecraftforge.common.capabilities.Capability<T> capability, net.minecraft.util.EnumFacing facing)
getCapability
in interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
in class net.minecraft.tileentity.TileEntity
protected void onSlotChange(net.minecraftforge.items.IItemHandlerModifiable handler, int slot, @Nonnull net.minecraft.item.ItemStack before, @Nonnull net.minecraft.item.ItemStack after)
public com.mojang.authlib.GameProfile getOwner()
getOwner
in interface IPlayerOwned
public PermissionUtil.PermissionBlock getPermBlock()
public boolean canEditOther(net.minecraft.util.math.BlockPos other)
public boolean canPlayerEdit(net.minecraft.entity.player.EntityPlayer player)
public boolean canInteractWith(net.minecraft.entity.player.EntityPlayer player)
public final void redrawBlock()
public final void sendNetworkUpdate(int id)
public final void sendNetworkGuiTick(net.minecraft.entity.player.EntityPlayer player)
public final void sendNetworkGuiUpdate(int id)
public final void sendNetworkUpdate(int id, net.minecraft.entity.player.EntityPlayer target)
public final MessageUpdateTile createNetworkUpdate(int id)
public final void createAndSendMessage(int id, IPayloadWriter writer)
public final void createAndSendGuiMessage(int id, IPayloadWriter writer)
public final void createAndSendMessage(int id, net.minecraft.entity.player.EntityPlayerMP player, IPayloadWriter writer)
public final void createAndSendGuiMessage(int id, net.minecraft.entity.player.EntityPlayerMP player, IPayloadWriter writer)
public final MessageUpdateTile createMessage(int id, IPayloadWriter writer)
public void onDataPacket(net.minecraft.network.NetworkManager net, net.minecraft.network.play.server.SPacketUpdateTileEntity pkt)
onDataPacket
in class net.minecraft.tileentity.TileEntity
public net.minecraft.network.play.server.SPacketUpdateTileEntity getUpdatePacket()
getUpdatePacket
in class net.minecraft.tileentity.TileEntity
public net.minecraft.nbt.NBTTagCompound getUpdateTag()
getUpdateTag
in class net.minecraft.tileentity.TileEntity
public void handleUpdateTag(net.minecraft.nbt.NBTTagCompound tag)
handleUpdateTag
in class net.minecraft.tileentity.TileEntity
public final net.minecraftforge.fml.common.network.simpleimpl.IMessage receivePayload(net.minecraftforge.fml.common.network.simpleimpl.MessageContext ctx, PacketBufferBC buffer) throws java.io.IOException
receivePayload
in interface IPayloadReceiver
java.io.IOException
public void writePayload(int id, PacketBufferBC buffer, net.minecraftforge.fml.relauncher.Side side)
public void readPayload(int id, PacketBufferBC buffer, net.minecraftforge.fml.relauncher.Side side, net.minecraftforge.fml.common.network.simpleimpl.MessageContext ctx) throws java.io.IOException
ctx
- The context. Will be null if this is a generic update payloadjava.io.IOException
- if something went wrongpublic void readFromNBT(net.minecraft.nbt.NBTTagCompound nbt)
readFromNBT
in class net.minecraft.tileentity.TileEntity
protected void migrateOldNBT(int version, net.minecraft.nbt.NBTTagCompound nbt)
public net.minecraft.nbt.NBTTagCompound writeToNBT(net.minecraft.nbt.NBTTagCompound nbt)
writeToNBT
in class net.minecraft.tileentity.TileEntity
protected void setWorldCreate(net.minecraft.world.World world)
setWorldCreate
in class net.minecraft.tileentity.TileEntity
public boolean isBeingDebugged()
public void enableDebugging()
public void disableDebugging()
IAdvDebugTarget
disableDebugging
in interface IAdvDebugTarget
public boolean doesExistInWorld()
IAdvDebugTarget
IAdvDebugTarget.disableDebugging()
will be called, and the current debug target will be removed.doesExistInWorld
in interface IAdvDebugTarget
public void sendDebugState()
IAdvDebugTarget
sendDebugState
in interface IAdvDebugTarget
public DetachedRenderer.IDetachedRenderer getDebugRenderer()
IAdvDebugTarget
IAdvDebugTarget.doesExistInWorld()
returns true.getDebugRenderer
in interface IAdvDebugTarget