net.minecraft.block.entity

public abstract class BlockEntity

implements DebugTrackable

net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.class_2586
net.minecraft.block.entity.BlockEntity

Field summary

Modifier and TypeField
private static final com.mojang.serialization.Codec<BlockEntityType<?>>
TYPE_CODEC
field_57768
TYPE_CODEC
private static final org.slf4j.Logger
LOGGER
field_11868
LOGGER
private final BlockEntityType<?>
type
field_11864
type
protected World
level
field_11863
world
protected final BlockPos
worldPosition
field_11867
pos
protected boolean
remove
field_11865
removed
private BlockState
blockState
field_11866
cachedState
private ComponentMap
components
field_50172
components

Constructor summary

ModifierConstructor
public (BlockEntityType<?> type, BlockPos pos, BlockState state)

Method summary

Modifier and TypeMethod
private void
validateBlockState(BlockState blockState)
method_61175(class_2680 arg0)
validateSupports(BlockState state)
public boolean
isValidBlockState(BlockState blockState)
method_61176(class_2680 arg0)
supports(BlockState state)
public static BlockPos
getPosFromTag(ChunkPos base, CompoundTag entityTag)
method_38239(class_1923 arg0, class_2487 arg1)
posFromNbt(ChunkPos chunkPos, NbtCompound nbt)
public World
getLevel()
method_10997()
getWorld()
public void
setLevel(Level level)
method_31662(class_1937 arg0)
setWorld(World world)
public boolean
hasLevel()
method_11002()
hasWorld()
protected void
loadAdditional(ValueInput input)
method_11014(class_11368 arg0)
readData(ReadView view)
public final void
loadWithComponents(ValueInput input)
method_58690(class_11368 arg0)
read(ReadView view)
public final void
loadCustomOnly(ValueInput input)
method_58691(class_11368 arg0)
readComponentlessData(ReadView view)
protected void
saveAdditional(ValueOutput output)
method_11007(class_11372 arg0)
writeData(WriteView view)
public final NbtCompound
saveWithFullMetadata(HolderLookup$Provider registries)
method_38242(class_7225$class_7874 arg0)
createNbtWithIdentifyingData(RegistryWrapper$WrapperLookup registries)
public void
saveWithFullMetadata(ValueOutput output)
method_71399(class_11372 arg0)
writeFullData(WriteView view)
public void
saveWithId(ValueOutput output)
method_38243(class_11372 arg0)
writeDataWithId(WriteView view)
public final NbtCompound
saveWithoutMetadata(HolderLookup$Provider registries)
method_38244(class_7225$class_7874 arg0)
createNbt(RegistryWrapper$WrapperLookup registries)
public void
saveWithoutMetadata(ValueOutput output)
method_71400(class_11372 arg0)
writeDataWithoutId(WriteView data)
public final NbtCompound
saveCustomOnly(HolderLookup$Provider registries)
method_58692(class_7225$class_7874 arg0)
createComponentlessNbt(RegistryWrapper$WrapperLookup registries)
public void
saveCustomOnly(ValueOutput output)
method_71401(class_11372 arg0)
writeComponentlessData(WriteView view)
private void
saveId(ValueOutput output)
method_38241(class_11372 arg0)
writeId(WriteView view)
public static void
addEntityType(ValueOutput output, BlockEntityType<?> type)
method_38238(class_11372 arg0, class_2591<?> arg1)
writeId(WriteView view, BlockEntityType<?> type)
private void
saveMetadata(ValueOutput output)
method_10999(class_11372 arg0)
writeIdentifyingData(WriteView view)
public static BlockEntity
loadStatic(BlockPos pos, BlockState state, CompoundTag tag, HolderLookup$Provider registries)
method_11005(class_2338 arg0, class_2680 arg1, class_2487 arg2, class_7225$class_7874 arg3)
createFromNbt(BlockPos pos, BlockState state, NbtCompound nbt, RegistryWrapper$WrapperLookup registries)
public void
setChanged()
method_5431()
markDirty()
protected static void
setChanged(Level level, BlockPos worldPosition, BlockState blockState)
method_31663(class_1937 arg0, class_2338 arg1, class_2680 arg2)
markDirty(World world, BlockPos pos, BlockState state)
public BlockPos
getBlockPos()
method_11016()
getPos()
public BlockState
getBlockState()
method_11010()
getCachedState()
public Packet<ClientPlayPacketListener>
getUpdatePacket()
method_38235()
toUpdatePacket()
public NbtCompound
getUpdateTag(HolderLookup$Provider registries)
method_16887(class_7225$class_7874 arg0)
toInitialChunkDataNbt(RegistryWrapper$WrapperLookup registries)
public boolean
isRemoved()
method_11015()
isRemoved()
public void
setRemoved()
method_11012()
markRemoved()
public void
clearRemoved()
method_10996()
cancelRemoval()
public void
preRemoveSideEffects(BlockPos pos, BlockState state)
method_66473(class_2338 arg0, class_2680 arg1)
onBlockReplaced(BlockPos pos, BlockState oldState)
public boolean
triggerEvent(int b0, int b1)
method_11004(int arg0, int arg1)
onSyncedBlockEvent(int type, int data)
public void
fillCrashReportCategory(CrashReportCategory category)
method_11003(class_129 arg0)
populateCrashReport(CrashReportSection crashReportSection)
public String
getNameForReporting()
method_61177()
getNameForReport()
public BlockEntityType<?>
getType()
method_11017()
getType()
public void
setBlockState(BlockState blockState)
method_31664(class_2680 arg0)
setCachedState(BlockState state)
protected void
applyImplicitComponents(DataComponentGetter components)
method_57568(class_9473 arg0)
readComponents(ComponentsAccess components)
public final void
applyComponentsFromItemStack(ItemStack stack)
method_58683(class_1799 arg0)
readComponents(ItemStack stack)
public final void
applyComponents(DataComponentMap prototype, DataComponentPatch patch)
method_58685(class_9323 arg0, class_9326 arg1)
readComponents(ComponentMap defaultComponents, ComponentChanges components)
protected void
collectImplicitComponents(DataComponentMap$Builder components)
method_57567(class_9323$class_9324 arg0)
addComponents(ComponentMap$Builder builder)
public void
removeComponentsFromTag(ValueOutput output)
method_57569(class_11372 arg0)
removeFromCopiedStackData(WriteView view)
public final ComponentMap
collectComponents()
method_57590()
createComponentMap()
public ComponentMap
components()
method_58693()
getComponents()
public void
setComponents(DataComponentMap components)
method_58684(class_9323 arg0)
setComponents(ComponentMap components)
public static Text
parseCustomNameSafe(ValueInput input, String name)
method_59894(class_11368 arg0, String arg1)
tryParseCustomName(ReadView view, String key)
public ErrorReporter$Context
problemPath()
method_71402()
getReporterContext()
public void
registerDebugValues(ServerLevel level, DebugValueSource$Registration registration)
method_74589(class_3218 arg0, class_12023$class_12024 arg1)
registerTracking(ServerWorld arg0, DebugTrackable$Tracker arg1)
private String
lambda$fillCrashReportCategory$0()
method_68811()
method_68811()