public class BrewingStandBlockEntity extends LockableContainerBlockEntity implements SidedInventory, Tickable
Modifier and Type | Field and Description |
---|---|
private static int[] |
BOTTOM_SLOTS |
private int |
brewTime |
private int |
fuel |
private DefaultedList<ItemStack> |
inventory |
private Item |
itemBrewing |
protected PropertyDelegate |
propertyDelegate |
private static int[] |
SIDE_SLOTS |
private boolean[] |
slotsEmptyLastTick |
private static int[] |
TOP_SLOTS |
pos, removed, world
Constructor and Description |
---|
BrewingStandBlockEntity() |
Modifier and Type | Method and Description |
---|---|
private boolean |
canCraft() |
boolean |
canExtract(int slot,
ItemStack stack,
Direction dir)
Determines whether the given stack can be removed from this inventory at the specified slot position from the given direction.
|
boolean |
canInsert(int slot,
ItemStack stack,
Direction dir)
Determines whether the given stack can be inserted into this inventory at the specified slot position from the given direction.
|
boolean |
canPlayerUse(PlayerEntity player) |
void |
clear() |
private void |
craft() |
protected ScreenHandler |
createScreenHandler(int syncId,
PlayerInventory playerInventory) |
void |
fromTag(BlockState state,
CompoundTag tag) |
int[] |
getAvailableSlots(Direction side)
Gets the available slot positions that are reachable from a given side.
|
protected Text |
getContainerName() |
boolean[] |
getSlotsEmpty() |
ItemStack |
getStack(int slot)
Fetches the stack currently stored at the given slot.
|
boolean |
isEmpty() |
boolean |
isValid(int slot,
ItemStack stack)
Returns whether the given stack is a valid for the indicated slot position.
|
ItemStack |
removeStack(int slot)
Removes the stack currently stored at the indicated slot.
|
ItemStack |
removeStack(int slot,
int amount)
Removes a specific number of items from the given slot.
|
void |
setStack(int slot,
ItemStack stack) |
int |
size() |
void |
tick() |
CompoundTag |
toTag(CompoundTag tag) |
checkUnlocked, checkUnlocked, createMenu, getCustomName, getDisplayName, getName, setCustomName
applyMirror, applyRotation, cancelRemoval, copyItemDataRequiresOperator, createFromTag, getCachedState, getPos, getSquaredRenderDistance, getType, getWorld, hasWorld, isRemoved, markDirty, markInvalid, markRemoved, onSyncedBlockEvent, populateCrashReport, resetBlock, setLocation, setPos, toInitialChunkDataTag, toUpdatePacket
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
containsAny, count, getMaxCountPerStack, markDirty, onClose, onOpen
hasCustomName
private static final int[] TOP_SLOTS
private static final int[] BOTTOM_SLOTS
private static final int[] SIDE_SLOTS
private DefaultedList<ItemStack> inventory
private int brewTime
private boolean[] slotsEmptyLastTick
private Item itemBrewing
private int fuel
protected final PropertyDelegate propertyDelegate
protected Text getContainerName()
getContainerName
in class LockableContainerBlockEntity
public boolean[] getSlotsEmpty()
private boolean canCraft()
private void craft()
public void fromTag(BlockState state, CompoundTag tag)
fromTag
in class LockableContainerBlockEntity
public CompoundTag toTag(CompoundTag tag)
toTag
in class LockableContainerBlockEntity
public ItemStack getStack(int slot)
ItemStack.EMPTY
.public ItemStack removeStack(int slot, int amount)
removeStack
in interface Inventory
public ItemStack removeStack(int slot)
removeStack
in interface Inventory
public void setStack(int slot, ItemStack stack)
public boolean canPlayerUse(PlayerEntity player)
canPlayerUse
in interface Inventory
public boolean isValid(int slot, ItemStack stack)
public int[] getAvailableSlots(Direction side)
getAvailableSlots
in interface SidedInventory
public boolean canInsert(int slot, ItemStack stack, @Nullable Direction dir)
canInsert
in interface SidedInventory
public boolean canExtract(int slot, ItemStack stack, Direction dir)
canExtract
in interface SidedInventory
protected ScreenHandler createScreenHandler(int syncId, PlayerInventory playerInventory)
createScreenHandler
in class LockableContainerBlockEntity