public class TileEntitySmartChest extends TileEntityTickableBase implements net.minecraft.inventory.container.INamedContainerProvider, IRedstoneControl<TileEntitySmartChest>, IComparatorSupport
| Modifier and Type | Class and Description |
|---|---|
static class |
TileEntitySmartChest.PushPullMode |
static class |
TileEntitySmartChest.SmartChestItemHandler |
TileEntityBase.UpgradeHandler| Modifier and Type | Field and Description |
|---|---|
static int |
CHEST_SIZE |
| Constructor and Description |
|---|
TileEntitySmartChest() |
| Modifier and Type | Method and Description |
|---|---|
net.minecraft.inventory.container.Container |
createMenu(int windowId,
net.minecraft.entity.player.PlayerInventory inv,
net.minecraft.entity.player.PlayerEntity player) |
void |
cycleMode(SideConfigurator.RelativeFace face) |
static net.minecraftforge.items.IItemHandler |
deserializeSmartChest(net.minecraft.nbt.CompoundNBT tag) |
net.minecraft.util.Direction |
getAbsoluteFacing(SideConfigurator.RelativeFace face,
net.minecraft.util.Direction dir) |
int |
getComparatorValue() |
void |
getContentsToDrop(net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> drops)
Collect all items which should be dropped when this TE is broken.
|
java.util.List<org.apache.commons.lang3.tuple.Pair<java.lang.Integer,net.minecraft.item.ItemStack>> |
getFilter() |
net.minecraft.item.ItemStack |
getFilter(int slotId) |
protected net.minecraftforge.common.util.LazyOptional<net.minecraftforge.items.IItemHandler> |
getInventoryCap() |
int |
getLastSlot() |
int |
getMaxItems() |
net.minecraftforge.items.IItemHandler |
getPrimaryInventory() |
TileEntitySmartChest.PushPullMode |
getPushPullMode(SideConfigurator.RelativeFace face) |
RedstoneController<TileEntitySmartChest> |
getRedstoneController()
Get the redstone controller object for this TE
|
int |
getTickRate() |
void |
handleGUIButtonPress(java.lang.String tag,
boolean shiftHeld,
net.minecraft.entity.player.ServerPlayerEntity player) |
void |
load(net.minecraft.block.BlockState state,
net.minecraft.nbt.CompoundNBT tag) |
net.minecraft.nbt.CompoundNBT |
save(net.minecraft.nbt.CompoundNBT tag) |
void |
serializeExtraItemData(net.minecraft.nbt.CompoundNBT blockEntityTag,
boolean preserveState)
Get any extra data to be serialized onto a dropped item stack.
|
void |
setFilter(int slotId,
net.minecraft.item.ItemStack stack) |
void |
setFilter(java.util.List<org.apache.commons.lang3.tuple.Pair<java.lang.Integer,net.minecraft.item.ItemStack>> l) |
void |
setLastSlot(int lastSlot) |
boolean |
shouldPreserveStateOnBreak()
Should this tile entity preserve its state (currently: upgrades and stored air) when broken?
By default this is true when sneak-wrenched, and false when broken by pick.
|
void |
tick() |
addLuaMethods, countPlayersUsing, getApplicableUpgrades, getCachedNeighbor, getCapability, getCurrentRecipeIdSynced, getCustomName, getDescriptionFields, getDisplayName, getHeatCap, getLuaMethodRegistry, getModelData, getName, getPeripheralType, getPosition, getRotation, getSpeedMultiplierFromUpgrades, getSpeedUsageMultiplierFromUpgrades, getUpdateTag, getUpgradeAcceptorTranslationKey, getUpgradeCache, getUpgradeHandler, getUpgrades, handleUpdateTag, isGuiUseableByPlayer, onBlockRotated, onDescUpdate, onFirstServerTick, onGuiUpdate, onNeighborBlockUpdate, onNeighborTileUpdate, onUpgradesChanged, readFromPacket, requestModelDataUpdate, sendDescriptionPacket, setChanged, setCustomName, setPreserveStateOnBreak, setRemoved, shouldRerenderChunkOnDescUpdate, shouldSyncField, updateNeighbours, writeToPacketclearCache, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getTileData, getType, getUpdatePacket, getViewDistance, hasLevel, isRemoved, loadStatic, logInvalidState, mirror, onChunkUnloaded, onlyOpCanSetNbt, rotate, setLevelAndPosition, setPosition, triggerEventareCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, invalidateCaps, reviveCaps, serializeCapsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDisplayNamegetCurrentRedstonePower, getRedstoneMode, getRedstoneTabTitle, onRedstoneModeChangedpublic static final int CHEST_SIZE
public void tick()
tick in interface net.minecraft.tileentity.ITickableTileEntitytick in class TileEntityTickableBasepublic int getTickRate()
public int getMaxItems()
public net.minecraft.util.Direction getAbsoluteFacing(SideConfigurator.RelativeFace face, net.minecraft.util.Direction dir)
public TileEntitySmartChest.PushPullMode getPushPullMode(SideConfigurator.RelativeFace face)
public net.minecraftforge.items.IItemHandler getPrimaryInventory()
getPrimaryInventory in class TileEntityBase@Nonnull protected net.minecraftforge.common.util.LazyOptional<net.minecraftforge.items.IItemHandler> getInventoryCap()
getInventoryCap in class TileEntityBase@Nullable
public net.minecraft.inventory.container.Container createMenu(int windowId,
net.minecraft.entity.player.PlayerInventory inv,
net.minecraft.entity.player.PlayerEntity player)
createMenu in interface net.minecraft.inventory.container.IContainerProviderpublic boolean shouldPreserveStateOnBreak()
TileEntityBaseshouldPreserveStateOnBreak in class TileEntityBasepublic void getContentsToDrop(net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> drops)
TileEntityBasegetContentsToDrop in class TileEntityBasedrops - list in which to collect dropped itemspublic net.minecraft.nbt.CompoundNBT save(net.minecraft.nbt.CompoundNBT tag)
save in class TileEntityBasepublic void load(net.minecraft.block.BlockState state,
net.minecraft.nbt.CompoundNBT tag)
load in class TileEntityBasepublic void serializeExtraItemData(net.minecraft.nbt.CompoundNBT blockEntityTag,
boolean preserveState)
TileEntityBaseTileEntity.load(BlockState, CompoundNBT) method) when the itemblock is next placed.serializeExtraItemData in class TileEntityBaseblockEntityTag - the existing "BlockEntityTag" subtag to add data topreserveState - true when dropped with a wrench, false when broken with a pickaxe etc.public void handleGUIButtonPress(java.lang.String tag,
boolean shiftHeld,
net.minecraft.entity.player.ServerPlayerEntity player)
handleGUIButtonPress in interface IGUIButtonSensitivehandleGUIButtonPress in class TileEntityBasepublic void cycleMode(SideConfigurator.RelativeFace face)
public int getLastSlot()
public void setLastSlot(int lastSlot)
public java.util.List<org.apache.commons.lang3.tuple.Pair<java.lang.Integer,net.minecraft.item.ItemStack>> getFilter()
public void setFilter(java.util.List<org.apache.commons.lang3.tuple.Pair<java.lang.Integer,net.minecraft.item.ItemStack>> l)
public net.minecraft.item.ItemStack getFilter(int slotId)
public void setFilter(int slotId,
net.minecraft.item.ItemStack stack)
public RedstoneController<TileEntitySmartChest> getRedstoneController()
IRedstoneControlgetRedstoneController in interface IRedstoneControl<TileEntitySmartChest>public int getComparatorValue()
getComparatorValue in interface IComparatorSupportpublic static net.minecraftforge.items.IItemHandler deserializeSmartChest(net.minecraft.nbt.CompoundNBT tag)