类 LootableContainerBlockEntity
- java.lang.Object
-
- net.minecraft.block.entity.BlockEntity
-
- net.minecraft.block.entity.LockableContainerBlockEntity
-
- net.minecraft.block.entity.LootableContainerBlockEntity
-
- 所有已实现的接口:
Inventory,NamedScreenHandlerFactory,ScreenHandlerFactory,Clearable,Nameable
- 直接已知子类:
BarrelBlockEntity,ChestBlockEntity,DispenserBlockEntity,HopperBlockEntity,ShulkerBoxBlockEntity
public abstract class LootableContainerBlockEntity extends LockableContainerBlockEntity
- Mappings:
Namespace Name official cimintermediary net/minecraft/class_2621named net/minecraft/block/entity/LootableContainerBlockEntity
-
-
字段概要
字段 修饰符和类型 字段 说明 static StringLOOT_TABLE_KEYstatic StringLOOT_TABLE_SEED_KEYprotected @Nullable IdentifierlootTableIdprotected longlootTableSeed-
从类继承的字段 net.minecraft.block.entity.BlockEntity
pos, removed, world
-
从接口继承的字段 net.minecraft.inventory.Inventory
MAX_COUNT_PER_STACK
-
-
构造器概要
构造器 限定符 构造器 说明 protectedLootableContainerBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state)
-
方法概要
所有方法 静态方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 booleancanPlayerUse(PlayerEntity player)voidcheckLootInteraction(@Nullable PlayerEntity player)booleancheckUnlocked(PlayerEntity player)voidclear()@Nullable ScreenHandlercreateMenu(int syncId, PlayerInventory inv, PlayerEntity player)protected booleandeserializeLootTable(CompoundTag nbt)protected abstract DefaultedList<ItemStack>getInvStackList()ItemStackgetStack(int slot)Fetches the stack currently stored at the given slot.booleanisEmpty()ItemStackremoveStack(int slot)Removes the stack currently stored at the indicated slot.ItemStackremoveStack(int slot, int amount)Removes a specific number of items from the given slot.protected booleanserializeLootTable(CompoundTag nbt)protected abstract voidsetInvStackList(DefaultedList<ItemStack> list)voidsetLootTable(Identifier id, long seed)static voidsetLootTable(BlockView world, Random random, BlockPos pos, Identifier id)voidsetStack(int slot, ItemStack stack)-
从类继承的方法 net.minecraft.block.entity.LockableContainerBlockEntity
checkUnlocked, createScreenHandler, getContainerName, getCustomName, getDisplayName, getName, readNbt, setCustomName, writeNbt
-
从类继承的方法 net.minecraft.block.entity.BlockEntity
cancelRemoval, copyItemDataRequiresOperator, createFromNbt, getCachedState, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onSyncedBlockEvent, populateCrashReport, setCachedState, setWorld, toInitialChunkDataNbt, toUpdatePacket
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 net.minecraft.inventory.Inventory
containsAny, count, getMaxCountPerStack, isValid, markDirty, onClose, onOpen, size
-
从接口继承的方法 net.minecraft.util.Nameable
hasCustomName
-
-
-
-
字段详细资料
-
LOOT_TABLE_KEY
public static final String LOOT_TABLE_KEY
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official u_Lcim;u_:Ljava/lang/String;intermediary field_31353Lnet/minecraft/class_2621;field_31353:Ljava/lang/String;named LOOT_TABLE_KEYLnet/minecraft/block/entity/LootableContainerBlockEntity;LOOT_TABLE_KEY:Ljava/lang/String;
-
LOOT_TABLE_SEED_KEY
public static final String LOOT_TABLE_SEED_KEY
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official eLcim;e:Ljava/lang/String;intermediary field_31352Lnet/minecraft/class_2621;field_31352:Ljava/lang/String;named LOOT_TABLE_SEED_KEYLnet/minecraft/block/entity/LootableContainerBlockEntity;LOOT_TABLE_SEED_KEY:Ljava/lang/String;
-
lootTableId
@Nullable protected @Nullable Identifier lootTableId
- Mappings:
Namespace Name Mixin selector official gLcim;g:Lwp;intermediary field_12037Lnet/minecraft/class_2621;field_12037:Lnet/minecraft/class_2960;named lootTableIdLnet/minecraft/block/entity/LootableContainerBlockEntity;lootTableId:Lnet/minecraft/util/Identifier;
-
lootTableSeed
protected long lootTableSeed
- Mappings:
Namespace Name Mixin selector official hLcim;h:Jintermediary field_12036Lnet/minecraft/class_2621;field_12036:Jnamed lootTableSeedLnet/minecraft/block/entity/LootableContainerBlockEntity;lootTableSeed:J
-
-
构造器详细资料
-
LootableContainerBlockEntity
protected LootableContainerBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state)
- Mappings:
Namespace Name Mixin selector official <init>Lchp;<init>(Lchr;Lgb;Lcjr;)Vintermediary <init>Lnet/minecraft/class_2586;<init>(Lnet/minecraft/class_2591;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vnamed <init>Lnet/minecraft/block/entity/BlockEntity;<init>(Lnet/minecraft/block/entity/BlockEntityType;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
-
方法详细资料
-
setLootTable
public static void setLootTable(BlockView world, Random random, BlockPos pos, Identifier id)
- Mappings:
Namespace Name Mixin selector official aLcim;a(Lbuv;Ljava/util/Random;Lgb;Lwp;)Vintermediary method_11287Lnet/minecraft/class_2621;method_11287(Lnet/minecraft/class_1922;Ljava/util/Random;Lnet/minecraft/class_2338;Lnet/minecraft/class_2960;)Vnamed setLootTableLnet/minecraft/block/entity/LootableContainerBlockEntity;setLootTable(Lnet/minecraft/world/BlockView;Ljava/util/Random;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/Identifier;)V
-
deserializeLootTable
protected boolean deserializeLootTable(CompoundTag nbt)
- Mappings:
Namespace Name Mixin selector official cLcim;c(Lmv;)Zintermediary method_11283Lnet/minecraft/class_2621;method_11283(Lnet/minecraft/class_2487;)Znamed deserializeLootTableLnet/minecraft/block/entity/LootableContainerBlockEntity;deserializeLootTable(Lnet/minecraft/nbt/CompoundTag;)Z
-
serializeLootTable
protected boolean serializeLootTable(CompoundTag nbt)
- Mappings:
Namespace Name Mixin selector official dLcim;d(Lmv;)Zintermediary method_11286Lnet/minecraft/class_2621;method_11286(Lnet/minecraft/class_2487;)Znamed serializeLootTableLnet/minecraft/block/entity/LootableContainerBlockEntity;serializeLootTable(Lnet/minecraft/nbt/CompoundTag;)Z
-
checkLootInteraction
public void checkLootInteraction(@Nullable @Nullable PlayerEntity player)
- Mappings:
Namespace Name Mixin selector official eLcim;e(Lbjf;)Vintermediary method_11289Lnet/minecraft/class_2621;method_11289(Lnet/minecraft/class_1657;)Vnamed checkLootInteractionLnet/minecraft/block/entity/LootableContainerBlockEntity;checkLootInteraction(Lnet/minecraft/entity/player/PlayerEntity;)V
-
setLootTable
public void setLootTable(Identifier id, long seed)
- Mappings:
Namespace Name Mixin selector official aLcim;a(Lwp;J)Vintermediary method_11285Lnet/minecraft/class_2621;method_11285(Lnet/minecraft/class_2960;J)Vnamed setLootTableLnet/minecraft/block/entity/LootableContainerBlockEntity;setLootTable(Lnet/minecraft/util/Identifier;J)V
-
isEmpty
public boolean isEmpty()
- Mappings:
Namespace Name Mixin selector official cLaqz;c()Zintermediary method_5442Lnet/minecraft/class_1263;method_5442()Znamed isEmptyLnet/minecraft/inventory/Inventory;isEmpty()Z
-
getStack
public ItemStack getStack(int slot)
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 official aLaqz;a(I)Lbpr;intermediary method_5438Lnet/minecraft/class_1263;method_5438(I)Lnet/minecraft/class_1799;named getStackLnet/minecraft/inventory/Inventory;getStack(I)Lnet/minecraft/item/ItemStack;
-
removeStack
public ItemStack removeStack(int slot, int amount)
Removes a specific number of items from the given slot.- 返回:
- the removed items as a stack
- Mappings:
Namespace Name Mixin selector official aLaqz;a(II)Lbpr;intermediary method_5434Lnet/minecraft/class_1263;method_5434(II)Lnet/minecraft/class_1799;named removeStackLnet/minecraft/inventory/Inventory;removeStack(II)Lnet/minecraft/item/ItemStack;
-
removeStack
public ItemStack removeStack(int slot)
Removes the stack currently stored at the indicated slot.- 返回:
- the stack previously stored at the indicated slot.
- Mappings:
Namespace Name Mixin selector official bLaqz;b(I)Lbpr;intermediary method_5441Lnet/minecraft/class_1263;method_5441(I)Lnet/minecraft/class_1799;named removeStackLnet/minecraft/inventory/Inventory;removeStack(I)Lnet/minecraft/item/ItemStack;
-
setStack
public void setStack(int slot, ItemStack stack)- Mappings:
Namespace Name Mixin selector official aLaqz;a(ILbpr;)Vintermediary method_5447Lnet/minecraft/class_1263;method_5447(ILnet/minecraft/class_1799;)Vnamed setStackLnet/minecraft/inventory/Inventory;setStack(ILnet/minecraft/item/ItemStack;)V
-
canPlayerUse
public boolean canPlayerUse(PlayerEntity player)
- Mappings:
Namespace Name Mixin selector official aLaqz;a(Lbjf;)Zintermediary method_5443Lnet/minecraft/class_1263;method_5443(Lnet/minecraft/class_1657;)Znamed canPlayerUseLnet/minecraft/inventory/Inventory;canPlayerUse(Lnet/minecraft/entity/player/PlayerEntity;)Z
-
clear
public void clear()
- Mappings:
Namespace Name Mixin selector official aa_Laqx;aa_()Vintermediary method_5448Lnet/minecraft/class_3829;method_5448()Vnamed clearLnet/minecraft/util/Clearable;clear()V
-
getInvStackList
protected abstract DefaultedList<ItemStack> getInvStackList()
- Mappings:
Namespace Name Mixin selector official fLcim;f()Lgn;intermediary method_11282Lnet/minecraft/class_2621;method_11282()Lnet/minecraft/class_2371;named getInvStackListLnet/minecraft/block/entity/LootableContainerBlockEntity;getInvStackList()Lnet/minecraft/util/collection/DefaultedList;
-
setInvStackList
protected abstract void setInvStackList(DefaultedList<ItemStack> list)
- Mappings:
Namespace Name Mixin selector official aLcim;a(Lgn;)Vintermediary method_11281Lnet/minecraft/class_2621;method_11281(Lnet/minecraft/class_2371;)Vnamed setInvStackListLnet/minecraft/block/entity/LootableContainerBlockEntity;setInvStackList(Lnet/minecraft/util/collection/DefaultedList;)V
-
checkUnlocked
public boolean checkUnlocked(PlayerEntity player)
- 覆盖:
checkUnlocked在类中LockableContainerBlockEntity- Mappings:
Namespace Name Mixin selector official dLchj;d(Lbjf;)Zintermediary method_17489Lnet/minecraft/class_2624;method_17489(Lnet/minecraft/class_1657;)Znamed checkUnlockedLnet/minecraft/block/entity/LockableContainerBlockEntity;checkUnlocked(Lnet/minecraft/entity/player/PlayerEntity;)Z
-
createMenu
@Nullable public @Nullable ScreenHandler createMenu(int syncId, PlayerInventory inv, PlayerEntity player)
- 指定者:
createMenu在接口中ScreenHandlerFactory- 覆盖:
createMenu在类中LockableContainerBlockEntity- Mappings:
Namespace Name Mixin selector official createMenuLbmo;createMenu(ILbje;Lbjf;)Lbll;intermediary createMenuLnet/minecraft/class_1270;createMenu(ILnet/minecraft/class_1661;Lnet/minecraft/class_1657;)Lnet/minecraft/class_1703;named createMenuLnet/minecraft/screen/ScreenHandlerFactory;createMenu(ILnet/minecraft/entity/player/PlayerInventory;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/screen/ScreenHandler;
-
-