Package net.minecraft.block.entity
Class LootableContainerBlockEntity
java.lang.Object
net.minecraft.block.entity.BlockEntity
net.minecraft.block.entity.LockableContainerBlockEntity
net.minecraft.block.entity.LootableContainerBlockEntity
- All Implemented Interfaces:
class_8934
,Inventory
,NamedScreenHandlerFactory
,ScreenHandlerFactory
,Clearable
,Nameable
- Direct Known Subclasses:
BarrelBlockEntity
,ChestBlockEntity
,CrafterBlockEntity
,DispenserBlockEntity
,HopperBlockEntity
,ShulkerBoxBlockEntity
public abstract class LootableContainerBlockEntity
extends LockableContainerBlockEntity
implements class_8934
- Mappings:
Namespace Name official dgm
intermediary net/minecraft/class_2621
named net/minecraft/block/entity/LootableContainerBlockEntity
-
Field Summary
FieldsFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world
Fields inherited from interface net.minecraft.class_8934
field_47154, field_47155
Fields inherited from interface net.minecraft.inventory.Inventory
field_42619, MAX_COUNT_PER_STACK
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
LootableContainerBlockEntity
(BlockEntityType<?> type, BlockPos pos, BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canPlayerUse
(PlayerEntity player) Returns whetherplayer
can use this inventory.boolean
checkUnlocked
(PlayerEntity player) void
clear()
createMenu
(int syncId, PlayerInventory playerInventory, PlayerEntity player) protected abstract DefaultedList<ItemStack>
getStack
(int slot) Returns the stack currently stored atslot
.boolean
isEmpty()
Returns whether the inventory consists entirely of empty item stacks.void
method_54866
(long long2) long
removeStack
(int slot) Removes the stack currently stored atslot
.removeStack
(int slot, int amount) Removes a specific number of items fromslot
.protected abstract void
void
setLootTable
(@Nullable Identifier identifier) void
Sets the stack stored atslot
tostack
.Methods inherited from class net.minecraft.block.entity.LockableContainerBlockEntity
checkUnlocked, createScreenHandler, getContainerName, getCustomName, getDisplayName, getName, readNbt, setCustomName, writeNbt
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.class_8934
getPos, getWorld, method_54867, method_54871, method_54872, method_54873
Methods inherited from interface net.minecraft.inventory.Inventory
canTransferTo, containsAny, containsAny, count, getMaxCountPerStack, isValid, markDirty, onClose, onOpen, size
Methods inherited from interface net.minecraft.util.Nameable
hasCustomName
-
Field Details
-
lootTableId
- Mappings:
Namespace Name Mixin selector official m
Ldgm;m:Lagm;
intermediary field_12037
Lnet/minecraft/class_2621;field_12037:Lnet/minecraft/class_2960;
named lootTableId
Lnet/minecraft/block/entity/LootableContainerBlockEntity;lootTableId:Lnet/minecraft/util/Identifier;
-
lootTableSeed
protected long lootTableSeed- Mappings:
Namespace Name Mixin selector official n
Ldgm;n:J
intermediary field_12036
Lnet/minecraft/class_2621;field_12036:J
named lootTableSeed
Lnet/minecraft/block/entity/LootableContainerBlockEntity;lootTableSeed:J
-
-
Constructor Details
-
LootableContainerBlockEntity
- Mappings:
Namespace Name Mixin selector official <init>
Ldfi;<init>(Ldfk;Lhx;Ldhn;)V
intermediary <init>
Lnet/minecraft/class_2586;<init>(Lnet/minecraft/class_2591;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
named <init>
Lnet/minecraft/block/entity/BlockEntity;<init>(Lnet/minecraft/block/entity/BlockEntityType;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
-
Method Details
-
method_54869
- Specified by:
method_54869
in interfaceclass_8934
- Mappings:
Namespace Name Mixin selector official aA_
Lbji;aA_()Lagm;
intermediary method_54869
Lnet/minecraft/class_8934;method_54869()Lnet/minecraft/class_2960;
named method_54869
Lnet/minecraft/class_8934;method_54869()Lnet/minecraft/util/Identifier;
-
setLootTable
- Specified by:
setLootTable
in interfaceclass_8934
- Mappings:
Namespace Name Mixin selector official a
Lbji;a(Lagm;)V
intermediary method_11285
Lnet/minecraft/class_8934;method_11285(Lnet/minecraft/class_2960;)V
named setLootTable
Lnet/minecraft/class_8934;setLootTable(Lnet/minecraft/util/Identifier;)V
-
method_54870
public long method_54870()- Specified by:
method_54870
in interfaceclass_8934
- Mappings:
Namespace Name Mixin selector official aB_
Lbji;aB_()J
intermediary method_54870
Lnet/minecraft/class_8934;method_54870()J
named method_54870
Lnet/minecraft/class_8934;method_54870()J
-
method_54866
public void method_54866(long long2) - Specified by:
method_54866
in interfaceclass_8934
- Mappings:
Namespace Name Mixin selector official a
Lbji;a(J)V
intermediary method_54866
Lnet/minecraft/class_8934;method_54866(J)V
named method_54866
Lnet/minecraft/class_8934;method_54866(J)V
-
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 aj_
Lbiu;aj_()Z
intermediary method_5442
Lnet/minecraft/class_1263;method_5442()Z
named isEmpty
Lnet/minecraft/inventory/Inventory;isEmpty()Z
-
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
Lbiu;a(I)Lclo;
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
Lbiu;a(II)Lclo;
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
Lbiu;b(I)Lclo;
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
Lbiu;a(Lcdz;)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
-
clear
public void clear() -
getHeldStacks
-
setInvStackList
- Mappings:
Namespace Name Mixin selector official a
Ldgm;a(Lip;)V
intermediary method_11281
Lnet/minecraft/class_2621;method_11281(Lnet/minecraft/class_2371;)V
named setInvStackList
Lnet/minecraft/block/entity/LootableContainerBlockEntity;setInvStackList(Lnet/minecraft/util/collection/DefaultedList;)V
-
checkUnlocked
- Overrides:
checkUnlocked
in classLockableContainerBlockEntity
- Mappings:
Namespace Name Mixin selector official d
Ldfc;d(Lcdz;)Z
intermediary method_17489
Lnet/minecraft/class_2624;method_17489(Lnet/minecraft/class_1657;)Z
named checkUnlocked
Lnet/minecraft/block/entity/LockableContainerBlockEntity;checkUnlocked(Lnet/minecraft/entity/player/PlayerEntity;)Z
-
createMenu
@Nullable public @Nullable ScreenHandler createMenu(int syncId, PlayerInventory playerInventory, PlayerEntity player) - Specified by:
createMenu
in interfaceScreenHandlerFactory
- Overrides:
createMenu
in classLockableContainerBlockEntity
- Mappings:
Namespace Name Mixin selector official createMenu
Lchx;createMenu(ILcdy;Lcdz;)Lcgr;
intermediary createMenu
Lnet/minecraft/class_1270;createMenu(ILnet/minecraft/class_1661;Lnet/minecraft/class_1657;)Lnet/minecraft/class_1703;
named createMenu
Lnet/minecraft/screen/ScreenHandlerFactory;createMenu(ILnet/minecraft/entity/player/PlayerInventory;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/screen/ScreenHandler;
-