ChunkLoadEvent
ChunkLoadEvent
=> org.bukkit.event.Event
=> org.bukkit.event.world.WorldEvent
=> org.bukkit.event.world.ChunkEvent
=> org.bukkit.event.world.ChunkLoadEvent
Called when a chunk is loaded当区块被加载时触发。
方法声明: public boolean isNewChunk()
方法签名: ()Z
Gets if this chunk was newly created or not.Note that if this chunk is new, it will not be populated at this time.@return true if the chunk is new, otherwise false该方法用于获取涉事区块是否为新近创建的。注意,如果区块是新创建的,在此事件触发时它不会被populate
。@return 如果是新创建的区块则返回true
,否则返回false
。译注:所谓“新创建”,其意实为区块首次被加载。在区块第一次被加载时要进行世界生成的一些相关操作。每一个区块会且仅会被这种操作处理一次,就是在首次被加载时。以后再次被加载时,世界生成的代码也不会对其进行操作了。所谓populate
其实是一个过时词汇。Yaossg 在其鸿篇 《浅析 1.13 世界生成》 中提出,“在过去,区块生成分为 Generation 和 Population 两个阶段,而在 1.13 以后,不再这样笼统的区分……”,因而此处不再赘述populate
的技术细节。所谓“在此事件触发时它不会被populate
”,是指ChunkPopulateEvent
在本事件之后触发,参见net.minecraft.server.v1_16_R3.Chunk#loadCallback()
方法。
方法声明: public HandlerList getHandlers()
方法签名: ()Lorg/bukkit/event/HandlerList;
方法声明: public static HandlerList getHandlerList()
方法签名: ()Lorg/bukkit/event/HandlerList;
Last modified 1mo ago