Interface ModifiableWorld
- All Known Subinterfaces:
- ModifiableTestableWorld,- RegistryWorldView,- ServerWorldAccess,- StructureWorldAccess,- WorldAccess
- All Known Implementing Classes:
- ChunkRegion,- ClientWorld,- ServerWorld,- World
- Mappings:
- Namespace - Name - named - net/minecraft/world/ModifiableWorld- intermediary - net/minecraft/class_1945- official - dci
- 
Method SummaryModifier and TypeMethodDescriptiondefault booleanbreakBlock(BlockPos pos, boolean drop) Removes the block and replaces it with the fluid occupying the block (such as water inside kelp), or air if it does not exist.default booleanbreakBlock(BlockPos pos, boolean drop, @Nullable Entity breakingEntity) Removes the block and replaces it with the fluid occupying the block (such as water inside kelp), or air if it does not exist.booleanbreakBlock(BlockPos pos, boolean drop, @Nullable Entity breakingEntity, int maxUpdateDepth) Removes the block and replaces it with the fluid occupying the block (such as water inside kelp), or air if it does not exist.booleanremoveBlock(BlockPos pos, boolean move) Removes the block and replaces it with the fluid occupying the block (such as water inside kelp), or air if it does not exist.default booleansetBlockState(BlockPos pos, BlockState state, int flags) Updates the block state at a position, calling appropriate callbacks.booleansetBlockState(BlockPos pos, BlockState state, int flags, int maxUpdateDepth) Updates the block state at a position, calling appropriate callbacks.default booleanspawnEntity(Entity entity) Spawns an entity.
- 
Method Details- 
setBlockStateUpdates the block state at a position, calling appropriate callbacks.When called on the server, the new block state is stored and propagated to clients and listeners as dictated by the supplied flags. Note that calling this on the client will update the world locally, but may not see the change persisted across loads. It's recommended to check whether this world is client before interacting with the world in this way. See setBlockState(BlockPos, BlockState, int)for a list of accepted flags.- Parameters:
- pos- the target position
- state- the block state to set
- flags- the bitwise flag combination, as described above
- maxUpdateDepth- the limit for the cascading block updates
- Mappings:
- Namespace - Name - Mixin selector - named - setBlockState- Lnet/minecraft/world/ModifiableWorld;setBlockState(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;II)Z- intermediary - method_30092- Lnet/minecraft/class_1945;method_30092(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;II)Z- official - a- Ldci;a(Liz;Ldse;II)Z
 
- 
setBlockStateUpdates the block state at a position, calling appropriate callbacks.When called on the server, the new block state is stored and propagated to clients and listeners as dictated by the supplied flags. Note that calling this on the client will update the world locally, but may not see the change persisted across loads. It's recommended to check whether this world is client before interacting with the world in this way. The accepted values of these flags are: - Parameters:
- pos- the target position
- state- the block state to set
- flags- the bitwise flag combination, as described above
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - setBlockState- Lnet/minecraft/world/ModifiableWorld;setBlockState(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;I)Z- intermediary - method_8652- Lnet/minecraft/class_1945;method_8652(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;I)Z- official - a- Ldci;a(Liz;Ldse;I)Z
 
- 
removeBlockRemoves the block and replaces it with the fluid occupying the block (such as water inside kelp), or air if it does not exist.- Parameters:
- move- whether the block was removed as part of piston moving blocks
- Returns:
- whether the block was removed successfully
- See Also:
- Implementation Note:
- This does not emit the world event or the game event.
- Mappings:
- Namespace - Name - Mixin selector - named - removeBlock- Lnet/minecraft/world/ModifiableWorld;removeBlock(Lnet/minecraft/util/math/BlockPos;Z)Z- intermediary - method_8650- Lnet/minecraft/class_1945;method_8650(Lnet/minecraft/class_2338;Z)Z- official - a- Ldci;a(Liz;Z)Z
 
- 
breakBlockRemoves the block and replaces it with the fluid occupying the block (such as water inside kelp), or air if it does not exist. Additionally, this emits the world event and the game event.- Returns:
- whether the block was removed successfully
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - breakBlock- Lnet/minecraft/world/ModifiableWorld;breakBlock(Lnet/minecraft/util/math/BlockPos;Z)Z- intermediary - method_22352- Lnet/minecraft/class_1945;method_22352(Lnet/minecraft/class_2338;Z)Z- official - b- Ldci;b(Liz;Z)Z
 
- 
breakBlockRemoves the block and replaces it with the fluid occupying the block (such as water inside kelp), or air if it does not exist. Additionally, this emits the world event and the game event.- Returns:
- whether the block was removed successfully
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - breakBlock- Lnet/minecraft/world/ModifiableWorld;breakBlock(Lnet/minecraft/util/math/BlockPos;ZLnet/minecraft/entity/Entity;)Z- intermediary - method_8651- Lnet/minecraft/class_1945;method_8651(Lnet/minecraft/class_2338;ZLnet/minecraft/class_1297;)Z- official - a- Ldci;a(Liz;ZLbsw;)Z
 
- 
breakBlockboolean breakBlock(BlockPos pos, boolean drop, @Nullable @Nullable Entity breakingEntity, int maxUpdateDepth) Removes the block and replaces it with the fluid occupying the block (such as water inside kelp), or air if it does not exist. Additionally, this emits the world event and the game event.- Returns:
- whether the block was removed successfully
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - breakBlock- Lnet/minecraft/world/ModifiableWorld;breakBlock(Lnet/minecraft/util/math/BlockPos;ZLnet/minecraft/entity/Entity;I)Z- intermediary - method_30093- Lnet/minecraft/class_1945;method_30093(Lnet/minecraft/class_2338;ZLnet/minecraft/class_1297;I)Z- official - a- Ldci;a(Liz;ZLbsw;I)Z
 
- 
spawnEntitySpawns an entity.- See Also:
- API Note:
- To spawn an entity with passengers, use
 ServerWorldAccess.spawnEntityAndPassengers(net.minecraft.entity.Entity).
- Mappings:
- Namespace - Name - Mixin selector - named - spawnEntity- Lnet/minecraft/world/ModifiableWorld;spawnEntity(Lnet/minecraft/entity/Entity;)Z- intermediary - method_8649- Lnet/minecraft/class_1945;method_8649(Lnet/minecraft/class_1297;)Z- official - b- Ldci;b(Lbsw;)Z
 
 
-