类 BaseContainerBlockEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BaseContainerBlockEntity
- 所有已实现的接口:
Clearable
,Container
,MenuConstructor
,MenuProvider
,Nameable
,ICapabilityProvider
,ICapabilityProviderImpl<BlockEntity>
,ICapabilitySerializable<CompoundTag>
,IForgeBlockEntity
,INBTSerializable<CompoundTag>
public abstract class BaseContainerBlockEntity
extends BlockEntity
implements Container, MenuProvider, Nameable
-
嵌套类概要
从类继承的嵌套类/接口 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
BaseContainerBlockEntity
(BlockEntityType<?> pType, BlockPos pPos, BlockState pBlockState) -
方法概要
修饰符和类型方法说明boolean
static boolean
protected abstract AbstractContainerMenu
createMenu
(int pContainerId, Inventory pInventory) createMenu
(int pContainerId, Inventory pPlayerInventory, Player pPlayer) protected IItemHandler
<T> LazyOptional<T>
getCapability
(Capability<T> cap, Direction side) Retrieves the Optional handler for the capability requested on the specific side.protected abstract Component
getName()
void
void
load
(CompoundTag pTag) void
protected void
saveAdditional
(CompoundTag pTag) void
setCustomName
(Component pName) 从类继承的方法 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.Clearable
clearContent
从接口继承的方法 net.minecraft.world.Container
canPlaceItem, canTakeItem, countItem, getContainerSize, getItem, getMaxStackSize, hasAnyMatching, hasAnyOf, isEmpty, removeItem, removeItemNoUpdate, setChanged, setItem, startOpen, stillValid, 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
-
字段详细资料
-
lockKey
-
name
-
itemHandler
-
-
构造器详细资料
-
BaseContainerBlockEntity
-
-
方法详细资料
-
load
- 覆盖:
load
在类中BlockEntity
-
saveAdditional
- 覆盖:
saveAdditional
在类中BlockEntity
-
setCustomName
-
getName
-
getDisplayName
- 指定者:
getDisplayName
在接口中MenuProvider
- 指定者:
getDisplayName
在接口中Nameable
-
getCustomName
- 指定者:
getCustomName
在接口中Nameable
-
getDefaultName
-
canOpen
-
canUnlock
-
createMenu
@Nullable public AbstractContainerMenu createMenu(int pContainerId, Inventory pPlayerInventory, Player pPlayer) - 指定者:
createMenu
在接口中MenuConstructor
-
createMenu
-
createUnSidedHandler
-
getCapability
从接口复制的说明:ICapabilityProvider
Retrieves the Optional handler for the capability requested on the specific side. The return value CAN be the same for multiple faces. Modders are encouraged to cache this value, using the listener capabilities of the Optional to be notified if the requested capability get lost.- 指定者:
getCapability
在接口中ICapabilityProvider
- 覆盖:
getCapability
在类中CapabilityProvider<BlockEntity>
- 参数:
cap
- The capability to checkside
- The Side to check from, CAN BE NULL. Null is defined to represent 'internal' or 'self'- 返回:
- The requested an optional holding the requested capability.
-
invalidateCaps
public void invalidateCaps()- 指定者:
invalidateCaps
在接口中ICapabilityProviderImpl<BlockEntity>
- 覆盖:
invalidateCaps
在类中CapabilityProvider<BlockEntity>
-
reviveCaps
public void reviveCaps()- 指定者:
reviveCaps
在接口中ICapabilityProviderImpl<BlockEntity>
- 覆盖:
reviveCaps
在类中CapabilityProvider<BlockEntity>
-