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:
Inventory,NamedScreenHandlerFactory,ScreenHandlerFactory,Clearable,Nameable
- Direct Known Subclasses:
BarrelBlockEntity,ChestBlockEntity,DispenserBlockEntity,HopperBlockEntity,ShulkerBoxBlockEntity
- Mappings:
Namespace Name intermediary net/minecraft/class_2621official dannamed net/minecraft/block/entity/LootableContainerBlockEntity
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringprotected @Nullable Identifierprotected longFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, worldFields inherited from interface net.minecraft.inventory.Inventory
field_42619, MAX_COUNT_PER_STACK -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLootableContainerBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanPlayerUse(PlayerEntity player) voidbooleancheckUnlocked(PlayerEntity player) voidclear()createMenu(int syncId, PlayerInventory playerInventory, PlayerEntity player) protected booleanprotected abstract DefaultedList<ItemStack>getStack(int slot) Fetches the stack currently stored at the given slot.booleanisEmpty()removeStack(int slot) Removes the stack currently stored at the indicated slot.removeStack(int slot, int amount) Removes a specific number of items from the given slot.protected booleanprotected abstract voidvoidsetLootTable(Identifier id, long seed) static voidsetLootTable(BlockView world, Random random, BlockPos pos, Identifier id) voidMethods inherited from class net.minecraft.block.entity.LockableContainerBlockEntity
checkUnlocked, createScreenHandler, getContainerName, getCustomName, getDisplayName, getName, readNbt, setCustomName, writeNbtMethods 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, writeIdToNbtMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.inventory.Inventory
canTransferTo, containsAny, containsAny, count, getMaxCountPerStack, isValid, markDirty, onClose, onOpen, sizeMethods inherited from interface net.minecraft.util.Nameable
hasCustomName
-
Field Details
-
LOOT_TABLE_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_31353Lnet/minecraft/class_2621;field_31353:Ljava/lang/String;official dLdan;d:Ljava/lang/String;named LOOT_TABLE_KEYLnet/minecraft/block/entity/LootableContainerBlockEntity;LOOT_TABLE_KEY:Ljava/lang/String;
-
LOOT_TABLE_SEED_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_31352Lnet/minecraft/class_2621;field_31352:Ljava/lang/String;official eLdan;e:Ljava/lang/String;named LOOT_TABLE_SEED_KEYLnet/minecraft/block/entity/LootableContainerBlockEntity;LOOT_TABLE_SEED_KEY:Ljava/lang/String;
-
lootTableId
- Mappings:
Namespace Name Mixin selector intermediary field_12037Lnet/minecraft/class_2621;field_12037:Lnet/minecraft/class_2960;official hLdan;h:Lacq;named lootTableIdLnet/minecraft/block/entity/LootableContainerBlockEntity;lootTableId:Lnet/minecraft/util/Identifier;
-
lootTableSeed
protected long lootTableSeed- Mappings:
Namespace Name Mixin selector intermediary field_12036Lnet/minecraft/class_2621;field_12036:Jofficial iLdan;i:Jnamed lootTableSeedLnet/minecraft/block/entity/LootableContainerBlockEntity;lootTableSeed:J
-
-
Constructor Details
-
LootableContainerBlockEntity
- Mappings:
Namespace Name Mixin selector intermediary <init>Lnet/minecraft/class_2586;<init>(Lnet/minecraft/class_2591;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vofficial <init>Lczk;<init>(Lczm;Lgu;Ldby;)Vnamed <init>Lnet/minecraft/block/entity/BlockEntity;<init>(Lnet/minecraft/block/entity/BlockEntityType;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
-
Method Details
-
setLootTable
- Mappings:
Namespace Name Mixin selector intermediary method_11287Lnet/minecraft/class_2621;method_11287(Lnet/minecraft/class_1922;Lnet/minecraft/class_5819;Lnet/minecraft/class_2338;Lnet/minecraft/class_2960;)Vofficial aLdan;a(Lclq;Lapf;Lgu;Lacq;)Vnamed setLootTableLnet/minecraft/block/entity/LootableContainerBlockEntity;setLootTable(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/random/Random;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/Identifier;)V
-
deserializeLootTable
- Mappings:
Namespace Name Mixin selector intermediary method_11283Lnet/minecraft/class_2621;method_11283(Lnet/minecraft/class_2487;)Zofficial dLdan;d(Lqr;)Znamed deserializeLootTableLnet/minecraft/block/entity/LootableContainerBlockEntity;deserializeLootTable(Lnet/minecraft/nbt/NbtCompound;)Z
-
serializeLootTable
- Mappings:
Namespace Name Mixin selector intermediary method_11286Lnet/minecraft/class_2621;method_11286(Lnet/minecraft/class_2487;)Zofficial eLdan;e(Lqr;)Znamed serializeLootTableLnet/minecraft/block/entity/LootableContainerBlockEntity;serializeLootTable(Lnet/minecraft/nbt/NbtCompound;)Z
-
checkLootInteraction
- Mappings:
Namespace Name Mixin selector intermediary method_11289Lnet/minecraft/class_2621;method_11289(Lnet/minecraft/class_1657;)Vofficial eLdan;e(Lbym;)Vnamed checkLootInteractionLnet/minecraft/block/entity/LootableContainerBlockEntity;checkLootInteraction(Lnet/minecraft/entity/player/PlayerEntity;)V
-
setLootTable
- Mappings:
Namespace Name Mixin selector intermediary method_11285Lnet/minecraft/class_2621;method_11285(Lnet/minecraft/class_2960;J)Vofficial aLdan;a(Lacq;J)Vnamed setLootTableLnet/minecraft/block/entity/LootableContainerBlockEntity;setLootTable(Lnet/minecraft/util/Identifier;J)V
-
isEmpty
public boolean isEmpty()- Mappings:
Namespace Name Mixin selector intermediary method_5442Lnet/minecraft/class_1263;method_5442()Zofficial aa_Lbdp;aa_()Znamed isEmptyLnet/minecraft/inventory/Inventory;isEmpty()Z
-
getStack
Fetches the stack currently stored at the given slot. If the slot is empty, or is outside the bounds of this inventory, returns seeItemStack.EMPTY.- Mappings:
Namespace Name Mixin selector intermediary method_5438Lnet/minecraft/class_1263;method_5438(I)Lnet/minecraft/class_1799;official aLbdp;a(I)Lcfx;named getStackLnet/minecraft/inventory/Inventory;getStack(I)Lnet/minecraft/item/ItemStack;
-
removeStack
Removes a specific number of items from the given slot.- Returns:
- the removed items as a stack
- Mappings:
Namespace Name Mixin selector intermediary method_5434Lnet/minecraft/class_1263;method_5434(II)Lnet/minecraft/class_1799;official aLbdp;a(II)Lcfx;named removeStackLnet/minecraft/inventory/Inventory;removeStack(II)Lnet/minecraft/item/ItemStack;
-
removeStack
Removes the stack currently stored at the indicated slot.- Returns:
- the stack previously stored at the indicated slot.
- Mappings:
Namespace Name Mixin selector intermediary method_5441Lnet/minecraft/class_1263;method_5441(I)Lnet/minecraft/class_1799;official bLbdp;b(I)Lcfx;named removeStackLnet/minecraft/inventory/Inventory;removeStack(I)Lnet/minecraft/item/ItemStack;
-
setStack
- Mappings:
Namespace Name Mixin selector intermediary method_5447Lnet/minecraft/class_1263;method_5447(ILnet/minecraft/class_1799;)Vofficial aLbdp;a(ILcfx;)Vnamed setStackLnet/minecraft/inventory/Inventory;setStack(ILnet/minecraft/item/ItemStack;)V
-
canPlayerUse
- Mappings:
Namespace Name Mixin selector intermediary method_5443Lnet/minecraft/class_1263;method_5443(Lnet/minecraft/class_1657;)Zofficial aLbdp;a(Lbym;)Znamed canPlayerUseLnet/minecraft/inventory/Inventory;canPlayerUse(Lnet/minecraft/entity/player/PlayerEntity;)Z
-
clear
public void clear()- Mappings:
Namespace Name Mixin selector intermediary method_5448Lnet/minecraft/class_3829;method_5448()Vofficial aLbdn;a()Vnamed clearLnet/minecraft/util/Clearable;clear()V
-
getInvStackList
- Mappings:
Namespace Name Mixin selector intermediary method_11282Lnet/minecraft/class_2621;method_11282()Lnet/minecraft/class_2371;official fLdan;f()Lhn;named getInvStackListLnet/minecraft/block/entity/LootableContainerBlockEntity;getInvStackList()Lnet/minecraft/util/collection/DefaultedList;
-
setInvStackList
- Mappings:
Namespace Name Mixin selector intermediary method_11281Lnet/minecraft/class_2621;method_11281(Lnet/minecraft/class_2371;)Vofficial aLdan;a(Lhn;)Vnamed setInvStackListLnet/minecraft/block/entity/LootableContainerBlockEntity;setInvStackList(Lnet/minecraft/util/collection/DefaultedList;)V
-
checkUnlocked
- Overrides:
checkUnlockedin classLockableContainerBlockEntity- Mappings:
Namespace Name Mixin selector intermediary method_17489Lnet/minecraft/class_2624;method_17489(Lnet/minecraft/class_1657;)Zofficial dLcze;d(Lbym;)Znamed checkUnlockedLnet/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:
createMenuin interfaceScreenHandlerFactory- Overrides:
createMenuin classLockableContainerBlockEntity- Mappings:
Namespace Name Mixin selector intermediary createMenuLnet/minecraft/class_1270;createMenu(ILnet/minecraft/class_1661;Lnet/minecraft/class_1657;)Lnet/minecraft/class_1703;official createMenuLcch;createMenu(ILbyl;Lbym;)Lcbd;named createMenuLnet/minecraft/screen/ScreenHandlerFactory;createMenu(ILnet/minecraft/entity/player/PlayerInventory;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/screen/ScreenHandler;
-