类 RandomizableContainerBlockEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BaseContainerBlockEntity
net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity
- 所有已实现的接口:
Clearable
,Container
,MenuConstructor
,MenuProvider
,Nameable
,ICapabilityProvider
,ICapabilityProviderImpl<BlockEntity>
,ICapabilitySerializable<CompoundTag>
,IForgeBlockEntity
,INBTSerializable<CompoundTag>
- 直接已知子类:
BarrelBlockEntity
,ChestBlockEntity
,DispenserBlockEntity
,HopperBlockEntity
,ShulkerBoxBlockEntity
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraftforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
-
字段概要
字段从类继承的字段 net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition
从接口继承的字段 net.minecraft.world.Container
DEFAULT_DISTANCE_LIMIT, LARGE_MAX_STACK_SIZE
从接口继承的字段 net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB
-
构造器概要
构造器限定符构造器说明protected
RandomizableContainerBlockEntity
(BlockEntityType<?> pType, BlockPos pPos, BlockState pBlockState) -
方法概要
修饰符和类型方法说明boolean
void
createMenu
(int pContainerId, Inventory pPlayerInventory, Player pPlayer) getItem
(int pIndex) protected abstract NonNullList<ItemStack>
getItems()
boolean
isEmpty()
removeItem
(int pIndex, int pCount) removeItemNoUpdate
(int pIndex) void
protected abstract void
setItems
(NonNullList<ItemStack> pItemStacks) void
setLootTable
(ResourceLocation pLootTable, long pLootTableSeed) static void
setLootTable
(BlockGetter pLevel, RandomSource pRandom, BlockPos pPos, ResourceLocation pLootTable) boolean
stillValid
(Player pPlayer) protected boolean
tryLoadLootTable
(CompoundTag pTag) protected boolean
trySaveLootTable
(CompoundTag pTag) void
unpackLootTable
(Player pPlayer) 从类继承的方法 net.minecraft.world.level.block.entity.BaseContainerBlockEntity
canUnlock, createMenu, createUnSidedHandler, getCapability, getCustomName, getDefaultName, getDisplayName, getName, invalidateCaps, load, reviveCaps, saveAdditional, setCustomName
从类继承的方法 net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setLevel, setRemoved, triggerEvent
从类继承的方法 net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, serializeCaps
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.minecraft.world.Container
canPlaceItem, canTakeItem, countItem, getContainerSize, getMaxStackSize, hasAnyMatching, hasAnyOf, setChanged, startOpen, stopOpen
从接口继承的方法 net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
从接口继承的方法 net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
从接口继承的方法 net.minecraft.world.Nameable
hasCustomName
-
字段详细资料
-
构造器详细资料
-
RandomizableContainerBlockEntity
protected RandomizableContainerBlockEntity(BlockEntityType<?> pType, BlockPos pPos, BlockState pBlockState)
-
-
方法详细资料
-
setLootTable
public static void setLootTable(BlockGetter pLevel, RandomSource pRandom, BlockPos pPos, ResourceLocation pLootTable) -
tryLoadLootTable
-
trySaveLootTable
-
unpackLootTable
-
setLootTable
-
isEmpty
public boolean isEmpty() -
getItem
-
removeItem
-
removeItemNoUpdate
-
setItem
-
stillValid
-
clearContent
public void clearContent() -
getItems
-
setItems
-
canOpen
- 覆盖:
canOpen
在类中BaseContainerBlockEntity
-
createMenu
@Nullable public AbstractContainerMenu createMenu(int pContainerId, Inventory pPlayerInventory, Player pPlayer) - 指定者:
createMenu
在接口中MenuConstructor
- 覆盖:
createMenu
在类中BaseContainerBlockEntity
-