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, setCustomNameapplyMirror, applyRotation, cancelRemoval, copyItemDataRequiresOperator, createFromTag, getCachedState, getPos, getSquaredRenderDistance, getType, getWorld, hasWorld, isRemoved, markDirty, markInvalid, markRemoved, onSyncedBlockEvent, populateCrashReport, resetBlock, setLocation, setPos, toInitialChunkDataTag, toUpdatePacketclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontainsAny, count, getMaxCountPerStack, markDirty, onClose, onOpenhasCustomNameprivate 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 LockableContainerBlockEntitypublic boolean[] getSlotsEmpty()
private boolean canCraft()
private void craft()
public void fromTag(BlockState state, CompoundTag tag)
fromTag in class LockableContainerBlockEntitypublic CompoundTag toTag(CompoundTag tag)
toTag in class LockableContainerBlockEntitypublic ItemStack getStack(int slot)
ItemStack.EMPTY.public ItemStack removeStack(int slot, int amount)
removeStack in interface Inventorypublic ItemStack removeStack(int slot)
removeStack in interface Inventorypublic void setStack(int slot,
ItemStack stack)
public boolean canPlayerUse(PlayerEntity player)
canPlayerUse in interface Inventorypublic boolean isValid(int slot,
ItemStack stack)
public int[] getAvailableSlots(Direction side)
getAvailableSlots in interface SidedInventorypublic boolean canInsert(int slot,
ItemStack stack,
@Nullable
Direction dir)
canInsert in interface SidedInventorypublic boolean canExtract(int slot,
ItemStack stack,
Direction dir)
canExtract in interface SidedInventoryprotected ScreenHandler createScreenHandler(int syncId, PlayerInventory playerInventory)
createScreenHandler in class LockableContainerBlockEntity