Class BrewingStandBlockEntity
- All Implemented Interfaces:
Inventory
,SidedInventory
,NamedScreenHandlerFactory
,ScreenHandlerFactory
,Clearable
,Nameable
- Mappings:
Namespace Name official dgy
intermediary net/minecraft/class_2589
named net/minecraft/block/entity/BrewingStandBlockEntity
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final int[]
static final int
(package private) int
(package private) int
static final int
private static final int
private static final int
private DefaultedList<ItemStack>
private Item
static final int
static final int
protected final PropertyDelegate
private static final int[]
private boolean[]
private static final int[]
Fields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world
Fields inherited from interface net.minecraft.inventory.Inventory
field_42619, MAX_COUNT_PER_STACK
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
canCraft
(DefaultedList<ItemStack> slots) boolean
canExtract
(int slot, ItemStack stack, Direction dir) Returns whether the given stack can be removed from this inventory at the specified slot position from the given direction.boolean
Returns whether the given stack can be inserted into this inventory at the specified slot position from the given direction.boolean
canPlayerUse
(PlayerEntity player) Returns whetherplayer
can use this inventory.void
clear()
private static void
craft
(World world, BlockPos pos, DefaultedList<ItemStack> slots) protected ScreenHandler
createScreenHandler
(int syncId, PlayerInventory playerInventory) int[]
getAvailableSlots
(Direction side) Returns the available slot positions that are reachable from a given side.protected Text
private boolean[]
getStack
(int slot) Returns the stack currently stored atslot
.boolean
isEmpty()
Returns whether the inventory consists entirely of empty item stacks.boolean
Returns whetherstack
is valid for theslot
.void
readNbt
(NbtCompound nbt) Reads data fromnbt
.removeStack
(int slot) Removes the stack currently stored atslot
.removeStack
(int slot, int amount) Removes a specific number of items fromslot
.void
Sets the stack stored atslot
tostack
.int
size()
Returns the size of the inventory.static void
tick
(World world, BlockPos pos, BlockState state, BrewingStandBlockEntity blockEntity) protected void
writeNbt
(NbtCompound nbt) Writes data tonbt
.Methods inherited from class net.minecraft.block.entity.LockableContainerBlockEntity
checkUnlocked, checkUnlocked, createMenu, getCustomName, getDisplayName, getName, setCustomName
Methods inherited from class net.minecraft.block.entity.BlockEntity
cancelRemoval, copyItemDataRequiresOperator, createFromNbt, createNbt, createNbtWithId, createNbtWithIdentifyingData, getCachedState, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onSyncedBlockEvent, populateCrashReport, posFromNbt, setCachedState, setStackNbt, setWorld, toInitialChunkDataNbt, toUpdatePacket, writeIdToNbt
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.inventory.Inventory
canTransferTo, containsAny, containsAny, count, getMaxCountPerStack, markDirty, onClose, onOpen
Methods inherited from interface net.minecraft.util.Nameable
hasCustomName
-
Field Details
-
INPUT_SLOT_INDEX
private static final int INPUT_SLOT_INDEX- See Also:
- Mappings:
Namespace Name Mixin selector official h
Ldgy;h:I
intermediary field_31328
Lnet/minecraft/class_2589;field_31328:I
named INPUT_SLOT_INDEX
Lnet/minecraft/block/entity/BrewingStandBlockEntity;INPUT_SLOT_INDEX:I
-
FUEL_SLOT_INDEX
private static final int FUEL_SLOT_INDEX- See Also:
- Mappings:
Namespace Name Mixin selector official i
Ldgy;i:I
intermediary field_31329
Lnet/minecraft/class_2589;field_31329:I
named FUEL_SLOT_INDEX
Lnet/minecraft/block/entity/BrewingStandBlockEntity;FUEL_SLOT_INDEX:I
-
TOP_SLOTS
private static final int[] TOP_SLOTS- Mappings:
Namespace Name Mixin selector official j
Ldgy;j:[I
intermediary field_11886
Lnet/minecraft/class_2589;field_11886:[I
named TOP_SLOTS
Lnet/minecraft/block/entity/BrewingStandBlockEntity;TOP_SLOTS:[I
-
BOTTOM_SLOTS
private static final int[] BOTTOM_SLOTS- Mappings:
Namespace Name Mixin selector official k
Ldgy;k:[I
intermediary field_11879
Lnet/minecraft/class_2589;field_11879:[I
named BOTTOM_SLOTS
Lnet/minecraft/block/entity/BrewingStandBlockEntity;BOTTOM_SLOTS:[I
-
SIDE_SLOTS
private static final int[] SIDE_SLOTS- Mappings:
Namespace Name Mixin selector official l
Ldgy;l:[I
intermediary field_11880
Lnet/minecraft/class_2589;field_11880:[I
named SIDE_SLOTS
Lnet/minecraft/block/entity/BrewingStandBlockEntity;SIDE_SLOTS:[I
-
MAX_FUEL_USES
public static final int MAX_FUEL_USES- See Also:
- Mappings:
Namespace Name Mixin selector official c
Ldgy;c:I
intermediary field_31324
Lnet/minecraft/class_2589;field_31324:I
named MAX_FUEL_USES
Lnet/minecraft/block/entity/BrewingStandBlockEntity;MAX_FUEL_USES:I
-
BREW_TIME_PROPERTY_INDEX
public static final int BREW_TIME_PROPERTY_INDEX- See Also:
- Mappings:
Namespace Name Mixin selector official d
Ldgy;d:I
intermediary field_31325
Lnet/minecraft/class_2589;field_31325:I
named BREW_TIME_PROPERTY_INDEX
Lnet/minecraft/block/entity/BrewingStandBlockEntity;BREW_TIME_PROPERTY_INDEX:I
-
FUEL_PROPERTY_INDEX
public static final int FUEL_PROPERTY_INDEX- See Also:
- Mappings:
Namespace Name Mixin selector official e
Ldgy;e:I
intermediary field_31326
Lnet/minecraft/class_2589;field_31326:I
named FUEL_PROPERTY_INDEX
Lnet/minecraft/block/entity/BrewingStandBlockEntity;FUEL_PROPERTY_INDEX:I
-
PROPERTY_COUNT
public static final int PROPERTY_COUNT- See Also:
- Mappings:
Namespace Name Mixin selector official f
Ldgy;f:I
intermediary field_31327
Lnet/minecraft/class_2589;field_31327:I
named PROPERTY_COUNT
Lnet/minecraft/block/entity/BrewingStandBlockEntity;PROPERTY_COUNT:I
-
inventory
- Mappings:
Namespace Name Mixin selector official m
Ldgy;m:Liq;
intermediary field_11882
Lnet/minecraft/class_2589;field_11882:Lnet/minecraft/class_2371;
named inventory
Lnet/minecraft/block/entity/BrewingStandBlockEntity;inventory:Lnet/minecraft/util/collection/DefaultedList;
-
brewTime
int brewTime- Mappings:
Namespace Name Mixin selector official n
Ldgy;n:I
intermediary field_11878
Lnet/minecraft/class_2589;field_11878:I
named brewTime
Lnet/minecraft/block/entity/BrewingStandBlockEntity;brewTime:I
-
slotsEmptyLastTick
private boolean[] slotsEmptyLastTick- Mappings:
Namespace Name Mixin selector official r
Ldgy;r:[Z
intermediary field_11883
Lnet/minecraft/class_2589;field_11883:[Z
named slotsEmptyLastTick
Lnet/minecraft/block/entity/BrewingStandBlockEntity;slotsEmptyLastTick:[Z
-
itemBrewing
- Mappings:
Namespace Name Mixin selector official s
Ldgy;s:Lcmt;
intermediary field_11881
Lnet/minecraft/class_2589;field_11881:Lnet/minecraft/class_1792;
named itemBrewing
Lnet/minecraft/block/entity/BrewingStandBlockEntity;itemBrewing:Lnet/minecraft/item/Item;
-
fuel
int fuel- Mappings:
Namespace Name Mixin selector official t
Ldgy;t:I
intermediary field_11885
Lnet/minecraft/class_2589;field_11885:I
named fuel
Lnet/minecraft/block/entity/BrewingStandBlockEntity;fuel:I
-
propertyDelegate
- Mappings:
Namespace Name Mixin selector official g
Ldgy;g:Lcil;
intermediary field_17381
Lnet/minecraft/class_2589;field_17381:Lnet/minecraft/class_3913;
named propertyDelegate
Lnet/minecraft/block/entity/BrewingStandBlockEntity;propertyDelegate:Lnet/minecraft/screen/PropertyDelegate;
-
-
Constructor Details
-
BrewingStandBlockEntity
- Mappings:
Namespace Name Mixin selector official <init>
Ldgy;<init>(Lhx;Ldjh;)V
intermediary <init>
Lnet/minecraft/class_2589;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
named <init>
Lnet/minecraft/block/entity/BrewingStandBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
-
Method Details
-
getContainerName
- Specified by:
getContainerName
in classLockableContainerBlockEntity
- Mappings:
Namespace Name Mixin selector official l
Ldgp;l()Lvf;
intermediary method_17823
Lnet/minecraft/class_2624;method_17823()Lnet/minecraft/class_2561;
named getContainerName
Lnet/minecraft/block/entity/LockableContainerBlockEntity;getContainerName()Lnet/minecraft/text/Text;
-
size
public int size()Returns the size of the inventory.The inventory should support the slot ID from
0
tosize() - 1
. This should remain constant throughout the inventory's lifetime. -
isEmpty
public boolean isEmpty()Returns whether the inventory consists entirely of empty item stacks.- Specified by:
isEmpty
in interfaceInventory
- Returns:
- whether the inventory consists entirely of empty item stacks
- Mappings:
Namespace Name Mixin selector official ai_
Lbju;ai_()Z
intermediary method_5442
Lnet/minecraft/class_1263;method_5442()Z
named isEmpty
Lnet/minecraft/inventory/Inventory;isEmpty()Z
-
tick
public static void tick(World world, BlockPos pos, BlockState state, BrewingStandBlockEntity blockEntity) - Mappings:
Namespace Name Mixin selector official a
Ldgy;a(Lctp;Lhx;Ldjh;Ldgy;)V
intermediary method_31665
Lnet/minecraft/class_2589;method_31665(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2589;)V
named tick
Lnet/minecraft/block/entity/BrewingStandBlockEntity;tick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/BrewingStandBlockEntity;)V
-
getSlotsEmpty
private boolean[] getSlotsEmpty()- Mappings:
Namespace Name Mixin selector official f
Ldgy;f()[Z
intermediary method_11028
Lnet/minecraft/class_2589;method_11028()[Z
named getSlotsEmpty
Lnet/minecraft/block/entity/BrewingStandBlockEntity;getSlotsEmpty()[Z
-
canCraft
- Mappings:
Namespace Name Mixin selector official a
Ldgy;a(Liq;)Z
intermediary method_11027
Lnet/minecraft/class_2589;method_11027(Lnet/minecraft/class_2371;)Z
named canCraft
Lnet/minecraft/block/entity/BrewingStandBlockEntity;canCraft(Lnet/minecraft/util/collection/DefaultedList;)Z
-
craft
- Mappings:
Namespace Name Mixin selector official a
Ldgy;a(Lctp;Lhx;Liq;)V
intermediary method_11029
Lnet/minecraft/class_2589;method_11029(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2371;)V
named craft
Lnet/minecraft/block/entity/BrewingStandBlockEntity;craft(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/collection/DefaultedList;)V
-
readNbt
Reads data fromnbt
. Subclasses should override this if they store a persistent data.NBT is a storage format; therefore, a data from NBT is loaded to a block entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the block entity.
nbt
might not have all expected keys, or might have a key whose value does not meet the requirement (such as the type or the range). This method should fall back to a reasonable default value instead of throwing an exception.- Overrides:
readNbt
in classLockableContainerBlockEntity
- See Also:
- Mappings:
Namespace Name Mixin selector official a
Ldgv;a(Lsn;)V
intermediary method_11014
Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;)V
named readNbt
Lnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;)V
-
writeNbt
Writes data tonbt
. Subclasses should override this if they store a persistent data.NBT is a storage format; therefore, a data from NBT is loaded to a block entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the block entity.
- Overrides:
writeNbt
in classLockableContainerBlockEntity
- See Also:
- Mappings:
Namespace Name Mixin selector official b
Ldgv;b(Lsn;)V
intermediary method_11007
Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;)V
named writeNbt
Lnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;)V
-
getStack
Returns the stack currently stored atslot
.If the slot is empty, or is outside the bounds of this inventory, this returns
ItemStack.EMPTY
.- Specified by:
getStack
in interfaceInventory
- Returns:
- the stack currently stored at
slot
- Mappings:
Namespace Name Mixin selector official a
Lbju;a(I)Lcmy;
intermediary method_5438
Lnet/minecraft/class_1263;method_5438(I)Lnet/minecraft/class_1799;
named getStack
Lnet/minecraft/inventory/Inventory;getStack(I)Lnet/minecraft/item/ItemStack;
-
removeStack
Removes a specific number of items fromslot
.- Specified by:
removeStack
in interfaceInventory
- Returns:
- the removed items as a stack
- Mappings:
Namespace Name Mixin selector official a
Lbju;a(II)Lcmy;
intermediary method_5434
Lnet/minecraft/class_1263;method_5434(II)Lnet/minecraft/class_1799;
named removeStack
Lnet/minecraft/inventory/Inventory;removeStack(II)Lnet/minecraft/item/ItemStack;
-
removeStack
Removes the stack currently stored atslot
.- Specified by:
removeStack
in interfaceInventory
- Returns:
- the stack previously stored at the indicated slot
- Mappings:
Namespace Name Mixin selector official b
Lbju;b(I)Lcmy;
intermediary method_5441
Lnet/minecraft/class_1263;method_5441(I)Lnet/minecraft/class_1799;
named removeStack
Lnet/minecraft/inventory/Inventory;removeStack(I)Lnet/minecraft/item/ItemStack;
-
setStack
Sets the stack stored atslot
tostack
. -
canPlayerUse
Returns whetherplayer
can use this inventory.This is called by
ScreenHandler.canUse(net.minecraft.screen.ScreenHandlerContext, net.minecraft.entity.player.PlayerEntity, net.minecraft.block.Block)
.- Specified by:
canPlayerUse
in interfaceInventory
- Returns:
- whether
player
can use this inventory - See Also:
- Mappings:
Namespace Name Mixin selector official a
Lbju;a(Lcfi;)Z
intermediary method_5443
Lnet/minecraft/class_1263;method_5443(Lnet/minecraft/class_1657;)Z
named canPlayerUse
Lnet/minecraft/inventory/Inventory;canPlayerUse(Lnet/minecraft/entity/player/PlayerEntity;)Z
-
isValid
Returns whetherstack
is valid for theslot
.Implementations can, for example, use this to check whether the item is in a specific tag. This returns
true
by default.- Specified by:
isValid
in interfaceInventory
- Returns:
- whether
stack
is valid for theslot
- Mappings:
Namespace Name Mixin selector official b
Lbju;b(ILcmy;)Z
intermediary method_5437
Lnet/minecraft/class_1263;method_5437(ILnet/minecraft/class_1799;)Z
named isValid
Lnet/minecraft/inventory/Inventory;isValid(ILnet/minecraft/item/ItemStack;)Z
-
getAvailableSlots
Returns the available slot positions that are reachable from a given side.- Specified by:
getAvailableSlots
in interfaceSidedInventory
- Returns:
- the available slot positions that are reachable from a given side
- Mappings:
Namespace Name Mixin selector official a
Lbkm;a(Lic;)[I
intermediary method_5494
Lnet/minecraft/class_1278;method_5494(Lnet/minecraft/class_2350;)[I
named getAvailableSlots
Lnet/minecraft/inventory/SidedInventory;getAvailableSlots(Lnet/minecraft/util/math/Direction;)[I
-
canInsert
Returns whether the given stack can be inserted into this inventory at the specified slot position from the given direction.- Specified by:
canInsert
in interfaceSidedInventory
- Returns:
- whether the given stack can be inserted into this inventory at the specified slot position from the given direction
- Mappings:
Namespace Name Mixin selector official a
Lbkm;a(ILcmy;Lic;)Z
intermediary method_5492
Lnet/minecraft/class_1278;method_5492(ILnet/minecraft/class_1799;Lnet/minecraft/class_2350;)Z
named canInsert
Lnet/minecraft/inventory/SidedInventory;canInsert(ILnet/minecraft/item/ItemStack;Lnet/minecraft/util/math/Direction;)Z
-
canExtract
Returns whether the given stack can be removed from this inventory at the specified slot position from the given direction.- Specified by:
canExtract
in interfaceSidedInventory
- Returns:
- whether the given stack can be removed from this inventory at the specified slot position from the given direction
- Mappings:
Namespace Name Mixin selector official b
Lbkm;b(ILcmy;Lic;)Z
intermediary method_5493
Lnet/minecraft/class_1278;method_5493(ILnet/minecraft/class_1799;Lnet/minecraft/class_2350;)Z
named canExtract
Lnet/minecraft/inventory/SidedInventory;canExtract(ILnet/minecraft/item/ItemStack;Lnet/minecraft/util/math/Direction;)Z
-
clear
public void clear() -
createScreenHandler
- Specified by:
createScreenHandler
in classLockableContainerBlockEntity
- Mappings:
Namespace Name Mixin selector official a
Ldgp;a(ILcfh;)Lcib;
intermediary method_5465
Lnet/minecraft/class_2624;method_5465(ILnet/minecraft/class_1661;)Lnet/minecraft/class_1703;
named createScreenHandler
Lnet/minecraft/block/entity/LockableContainerBlockEntity;createScreenHandler(ILnet/minecraft/entity/player/PlayerInventory;)Lnet/minecraft/screen/ScreenHandler;
-