public class InfuserTileEntity
extends net.minecraft.tileentity.TileEntity
implements net.minecraft.inventory.ISidedInventory, net.minecraft.tileentity.ITickableTileEntity, net.minecraft.inventory.container.INamedContainerProvider
Modifier and Type | Field and Description |
---|---|
int |
currentItemRunTime
The number of ticks that a fresh copy of the currently-burning item would keep the infuser running for.
|
int |
frame
The current animation frame.
|
int |
infuserProgressTime
The number of ticks that the current item has been running for.
|
int |
infuserRunTime
The number of ticks that the infuser will keep running for.
|
boolean |
isRunning
Whether the infuser is processing an item.
|
net.minecraft.item.Item |
itemOnInfuser
The item being processed by the infuser.
|
int |
renderPass
Rendering only fields
|
net.minecraft.item.Item |
secondItemOnInfuser
The secondary item being processed by the infuser.
|
int |
state
The animation state of the mechanical infuser.
|
Constructor and Description |
---|
InfuserTileEntity() |
Modifier and Type | Method and Description |
---|---|
boolean |
canPlaceItem(int slotIndex,
net.minecraft.item.ItemStack itemStack)
Automation.
|
boolean |
canPlaceItemThroughFace(int index,
net.minecraft.item.ItemStack itemStackIn,
net.minecraft.util.Direction direction)
Returns true if automation can insert the given item in the given slot from the given side.
|
boolean |
canTakeItemThroughFace(int slotIndex,
net.minecraft.item.ItemStack itemStack,
net.minecraft.util.Direction direction)
Returns true if automation can extract the given item in the given slot from the given side.
|
void |
clearContent() |
net.minecraft.inventory.container.Container |
createMenu(int id,
net.minecraft.entity.player.PlayerInventory inventory,
net.minecraft.entity.player.PlayerEntity player) |
int |
getBurnTimeRemainingScaled(int p_145955_1_)
Returns an integer between 0 and the passed value representing how much burn time is left on the current fuel
item, where 0 means that the item is exhausted and the passed value means that the item is fresh.
|
int |
getContainerSize()
Returns the number of slots in the inventory.
|
net.minecraft.util.text.ITextComponent |
getDisplayName() |
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> |
getInfuserItemStacks() |
int |
getInfusionProgressScaled(int p_145953_1_)
Returns an integer between 0 and the passed value representing how close the current item is to being completely
hammered.
|
net.minecraft.item.ItemStack |
getItem(int slotIndex)
Returns the stack in slot i.
|
int |
getMaxStackSize() |
int[] |
getSlotsForFace(net.minecraft.util.Direction side)
Returns an array containing the indices of the slots that can be accessed by automation on the given side of this
block.
|
net.minecraft.network.play.server.SUpdateTileEntityPacket |
getUpdatePacket() |
net.minecraft.nbt.CompoundNBT |
getUpdateTag() |
boolean |
isEmpty() |
boolean |
isRunning()
Checks if the infuser is running.
|
void |
load(net.minecraft.block.BlockState state,
net.minecraft.nbt.CompoundNBT nbtTagCompound) |
void |
onDataPacket(net.minecraft.network.NetworkManager net,
net.minecraft.network.play.server.SUpdateTileEntityPacket pkt) |
net.minecraft.item.ItemStack |
removeItem(int slotIndex,
int decreaseBy)
Removes from an inventory slot up to a specified number of items and returns them in a new stack.
|
net.minecraft.item.ItemStack |
removeItemNoUpdate(int slotIndex)
When some containers are closed they call this on each slot, then drop whatever it
returns as an EntityItem - like when you close a workbench GUI.
|
net.minecraft.nbt.CompoundNBT |
save(net.minecraft.nbt.CompoundNBT nbtTagCompound) |
void |
setItem(int slotIndex,
net.minecraft.item.ItemStack itemStack)
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
|
void |
startOpen(net.minecraft.entity.player.PlayerEntity playerIn) |
boolean |
stillValid(net.minecraft.entity.player.PlayerEntity player)
Do not give this method the name canInteractWith because it clashes with Container.
|
void |
stopOpen(net.minecraft.entity.player.PlayerEntity playerIn) |
void |
tick() |
clearCache, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getTileData, getType, getViewDistance, hasLevel, isRemoved, loadStatic, logInvalidState, mirror, onChunkUnloaded, onlyOpCanSetNbt, rotate, setChanged, setLevelAndPosition, setPosition, setRemoved, triggerEvent
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public int infuserRunTime
public int currentItemRunTime
public int infuserProgressTime
public int renderPass
public boolean isRunning
public net.minecraft.item.Item itemOnInfuser
public net.minecraft.item.Item secondItemOnInfuser
public int state
public int frame
public int getContainerSize()
getContainerSize
in interface net.minecraft.inventory.IInventory
public net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> getInfuserItemStacks()
public boolean isEmpty()
isEmpty
in interface net.minecraft.inventory.IInventory
public net.minecraft.item.ItemStack getItem(int slotIndex)
getItem
in interface net.minecraft.inventory.IInventory
public net.minecraft.item.ItemStack removeItem(int slotIndex, int decreaseBy)
removeItem
in interface net.minecraft.inventory.IInventory
slotIndex
- An inventory slot.decreaseBy
- A specified number of items.public net.minecraft.item.ItemStack removeItemNoUpdate(int slotIndex)
removeItemNoUpdate
in interface net.minecraft.inventory.IInventory
public void setItem(int slotIndex, net.minecraft.item.ItemStack itemStack)
setItem
in interface net.minecraft.inventory.IInventory
slotIndex
- A specified slot in the inventory.itemStack
- An item stack.public int getMaxStackSize()
getMaxStackSize
in interface net.minecraft.inventory.IInventory
public boolean stillValid(net.minecraft.entity.player.PlayerEntity player)
stillValid
in interface net.minecraft.inventory.IInventory
public boolean canPlaceItem(int slotIndex, net.minecraft.item.ItemStack itemStack)
canPlaceItem
in interface net.minecraft.inventory.IInventory
public int[] getSlotsForFace(net.minecraft.util.Direction side)
getSlotsForFace
in interface net.minecraft.inventory.ISidedInventory
side
- A side.public boolean canPlaceItemThroughFace(int index, net.minecraft.item.ItemStack itemStackIn, net.minecraft.util.Direction direction)
canPlaceItemThroughFace
in interface net.minecraft.inventory.ISidedInventory
index
- Slot.itemStackIn
- Item.direction
- Side.public boolean canTakeItemThroughFace(int slotIndex, net.minecraft.item.ItemStack itemStack, net.minecraft.util.Direction direction)
canTakeItemThroughFace
in interface net.minecraft.inventory.ISidedInventory
slotIndex
- Slot.itemStack
- Item.direction
- Side.public net.minecraft.nbt.CompoundNBT getUpdateTag()
getUpdateTag
in class net.minecraft.tileentity.TileEntity
public net.minecraft.network.play.server.SUpdateTileEntityPacket getUpdatePacket()
getUpdatePacket
in class net.minecraft.tileentity.TileEntity
public void onDataPacket(net.minecraft.network.NetworkManager net, net.minecraft.network.play.server.SUpdateTileEntityPacket pkt)
onDataPacket
in interface net.minecraftforge.common.extensions.IForgeTileEntity
public void load(net.minecraft.block.BlockState state, net.minecraft.nbt.CompoundNBT nbtTagCompound)
load
in class net.minecraft.tileentity.TileEntity
public net.minecraft.nbt.CompoundNBT save(net.minecraft.nbt.CompoundNBT nbtTagCompound)
save
in class net.minecraft.tileentity.TileEntity
public int getInfusionProgressScaled(int p_145953_1_)
public int getBurnTimeRemainingScaled(int p_145955_1_)
p_145955_1_
- The fresh burn time.public boolean isRunning()
public void tick()
tick
in interface net.minecraft.tileentity.ITickableTileEntity
public void startOpen(net.minecraft.entity.player.PlayerEntity playerIn)
startOpen
in interface net.minecraft.inventory.IInventory
public void stopOpen(net.minecraft.entity.player.PlayerEntity playerIn)
stopOpen
in interface net.minecraft.inventory.IInventory
public void clearContent()
clearContent
in interface net.minecraft.inventory.IClearable
public net.minecraft.util.text.ITextComponent getDisplayName()
getDisplayName
in interface net.minecraft.inventory.container.INamedContainerProvider
@Nullable public net.minecraft.inventory.container.Container createMenu(int id, net.minecraft.entity.player.PlayerInventory inventory, net.minecraft.entity.player.PlayerEntity player)
createMenu
in interface net.minecraft.inventory.container.IContainerProvider