接口 IEntityWithComplexSpawn
- 所有已知实现类:
EntityTests.CustomComplexSpawnEntity
public interface IEntityWithComplexSpawn
An interface for Entities that need extra information to be communicated
between the server and client when they are spawned.
-
方法概要
修饰符和类型方法说明void
readSpawnData
(RegistryFriendlyByteBuf additionalData) Called by the client when it receives a Entity spawn packet.void
Called by the server when constructing the spawn packet.
-
方法详细资料
-
writeSpawnData
Called by the server when constructing the spawn packet. Data should be added to the provided stream.- 参数:
buffer
- The packet data stream
-
readSpawnData
Called by the client when it receives a Entity spawn packet. Data should be read out of the stream in the same way as it was written.- 参数:
additionalData
- The packet data stream
-