接口 ModifiableWorld
-
- 所有已知子接口:
ModifiableTestableWorld,RegistryWorldView,ServerWorldAccess,StructureWorldAccess,WorldAccess
- 所有已知实现类:
ChunkRegion,ClientWorld,ServerWorld,World
public interface ModifiableWorldRepresents a modifiable world where block states can be changed and entities spawned.- Mappings:
Namespace Name official bvzintermediary net/minecraft/class_1945named net/minecraft/world/ModifiableWorld
-
-
方法概要
所有方法 实例方法 抽象方法 默认方法 修饰符和类型 方法 说明 default booleanbreakBlock(BlockPos pos, boolean drop)default booleanbreakBlock(BlockPos pos, boolean drop, @Nullable Entity breakingEntity)booleanbreakBlock(BlockPos pos, boolean drop, @Nullable Entity breakingEntity, int maxUpdateDepth)booleanremoveBlock(BlockPos pos, boolean move)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)
-
-
-
方法详细资料
-
setBlockState
boolean setBlockState(BlockPos pos, BlockState state, int flags, int maxUpdateDepth)
Updates 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.- 参数:
pos- the target positionstate- the block state to setflags- the bitwise flag combination, as described abovemaxUpdateDepth- the limit for the cascading block updates- Mappings:
Namespace Name Mixin selector official aLbvz;a(Lgb;Lcjr;II)Zintermediary method_30092Lnet/minecraft/class_1945;method_30092(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;II)Znamed setBlockStateLnet/minecraft/world/ModifiableWorld;setBlockState(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;II)Z
-
setBlockState
default boolean setBlockState(BlockPos pos, BlockState state, int flags)
Updates 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:
- 参数:
pos- the target positionstate- the block state to setflags- the bitwise flag combination, as described above- 另请参阅:
setBlockState(BlockPos, BlockState, int, int)- Mappings:
Namespace Name Mixin selector official aLbvz;a(Lgb;Lcjr;I)Zintermediary method_8652Lnet/minecraft/class_1945;method_8652(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;I)Znamed setBlockStateLnet/minecraft/world/ModifiableWorld;setBlockState(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;I)Z
-
removeBlock
boolean removeBlock(BlockPos pos, boolean move)
- Mappings:
Namespace Name Mixin selector official aLbvz;a(Lgb;Z)Zintermediary method_8650Lnet/minecraft/class_1945;method_8650(Lnet/minecraft/class_2338;Z)Znamed removeBlockLnet/minecraft/world/ModifiableWorld;removeBlock(Lnet/minecraft/util/math/BlockPos;Z)Z
-
breakBlock
default boolean breakBlock(BlockPos pos, boolean drop)
- Mappings:
Namespace Name Mixin selector official bLbvz;b(Lgb;Z)Zintermediary method_22352Lnet/minecraft/class_1945;method_22352(Lnet/minecraft/class_2338;Z)Znamed breakBlockLnet/minecraft/world/ModifiableWorld;breakBlock(Lnet/minecraft/util/math/BlockPos;Z)Z
-
breakBlock
default boolean breakBlock(BlockPos pos, boolean drop, @Nullable @Nullable Entity breakingEntity)
- Mappings:
Namespace Name Mixin selector official aLbvz;a(Lgb;ZLasl;)Zintermediary method_8651Lnet/minecraft/class_1945;method_8651(Lnet/minecraft/class_2338;ZLnet/minecraft/class_1297;)Znamed breakBlockLnet/minecraft/world/ModifiableWorld;breakBlock(Lnet/minecraft/util/math/BlockPos;ZLnet/minecraft/entity/Entity;)Z
-
breakBlock
boolean breakBlock(BlockPos pos, boolean drop, @Nullable @Nullable Entity breakingEntity, int maxUpdateDepth)
- Mappings:
Namespace Name Mixin selector official aLbvz;a(Lgb;ZLasl;I)Zintermediary method_30093Lnet/minecraft/class_1945;method_30093(Lnet/minecraft/class_2338;ZLnet/minecraft/class_1297;I)Znamed breakBlockLnet/minecraft/world/ModifiableWorld;breakBlock(Lnet/minecraft/util/math/BlockPos;ZLnet/minecraft/entity/Entity;I)Z
-
spawnEntity
default boolean spawnEntity(Entity entity)
- Mappings:
Namespace Name Mixin selector official bLbvz;b(Lasl;)Zintermediary method_8649Lnet/minecraft/class_1945;method_8649(Lnet/minecraft/class_1297;)Znamed spawnEntityLnet/minecraft/world/ModifiableWorld;spawnEntity(Lnet/minecraft/entity/Entity;)Z
-
-