Package net.minecraft.world.level
Interface LevelWriter
- All Known Subinterfaces:
CommonLevelAccessor,LevelAccessor,LevelSimulatedRW,ServerLevelAccessor,WorldGenLevel
- All Known Implementing Classes:
ClientLevel,Level,ServerLevel,WorldGenRegion
public interface LevelWriter
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanaddFreshEntity(Entity entity) default booleandestroyBlock(BlockPos pos, boolean dropBlock) Sets a block to air, but also plays the sound and particles and can spawn dropsdefault booleandestroyBlock(BlockPos pos, boolean dropBlock, @Nullable Entity entity) booleandestroyBlock(BlockPos pos, boolean dropBlock, @Nullable Entity entity, int recursionLeft) booleanremoveBlock(BlockPos pos, boolean movedByPiston) default booleansetBlock(BlockPos pos, BlockState state, @net.minecraft.world.level.block.Block.UpdateFlags int flags) booleansetBlock(BlockPos pos, BlockState state, @net.minecraft.world.level.block.Block.UpdateFlags int flags, int recursionLeft) Sets a block state into this world.
-
Method Details
-
setBlock
boolean setBlock(BlockPos pos, BlockState state, @net.minecraft.world.level.block.Block.UpdateFlags int flags, int recursionLeft) Sets a block state into this world. Flags are as follows:Block.UPDATE_NEIGHBORSwill notify neighboring block updates.Block.UPDATE_CLIENTSwill send the change to clients.Block.UPDATE_INVISIBLEwill prevent the block from being re-rendered.Block.UPDATE_IMMEDIATEwill force any re-renders to run on the main thread instead.Block.UPDATE_KNOWN_SHAPEwill prevent neighbor reactions (e.g. fences connecting, observers pulsing).Block.UPDATE_SUPPRESS_DROPSwill prevent neighbor reactions from spawning drops.Block.UPDATE_MOVE_BY_PISTONwill signify the block is being moved.Block.UPDATE_SKIP_SHAPE_UPDATE_ON_WIREwill skip shape update for redstone wire.Block.UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTSwill skip block entity removal side effects (BlockEntity#preRemoveSideEffects).Block.UPDATE_SKIP_ON_PLACEwill skip block placement post reaction (BlockBehaviour#onPlace).
-
setBlock
default boolean setBlock(BlockPos pos, BlockState state, @net.minecraft.world.level.block.Block.UpdateFlags int flags) -
removeBlock
-
destroyBlock
Sets a block to air, but also plays the sound and particles and can spawn drops -
destroyBlock
-
destroyBlock
-
addFreshEntity
-