Contents
- Description
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- updateChunk(long)
- updateChunkTints(long)
- updateSectionEnvironments(int, int, int)
- sendBlockParticle(double, double, double, int, BlockParticleEvent)
- sendBlockParticle(PlayerRef, double, double, double, int, BlockParticleEvent)
- sendPacketIfChunkLoaded(ToClientPacket, int, int)
- sendPacketIfChunkLoaded(ToClientPacket, long)
- getBlockParticlePacket(double, double, double, int, BlockParticleEvent)
Class WorldNotificationHandler
java.lang.Object
com.hypixel.hytale.server.core.universe.world.WorldNotificationHandler
Handler for world notifications, such as block updates and particle effects.
-
Constructor Summary
ConstructorsConstructorDescriptionWorldNotificationHandler(World world) Default Constructor for aWorldNotificationHandlerinstance. -
Method Summary
Modifier and TypeMethodDescriptiongetBlockParticlePacket(double x, double y, double z, int id, BlockParticleEvent particleType) voidsendBlockParticle(double x, double y, double z, int id, BlockParticleEvent particleType) voidsendBlockParticle(PlayerRef playerRef, double x, double y, double z, int id, BlockParticleEvent particleType) voidsendPacketIfChunkLoaded(ToClientPacket packet, int x, int z) voidsendPacketIfChunkLoaded(ToClientPacket packet, long indexChunk) voidupdateChunk(long indexChunk) voidupdateChunkTints(long indexChunk) voidupdateSectionEnvironments(int x, int y, int z) Sends the environments of one chunk section to every player already tracking it.
-
Constructor Details
-
WorldNotificationHandler
Default Constructor for aWorldNotificationHandlerinstance.- Parameters:
world- TheWorldinstance this handler is associated with.
-
-
Method Details
-
updateChunk
public void updateChunk(long indexChunk) -
updateChunkTints
public void updateChunkTints(long indexChunk) -
updateSectionEnvironments
public void updateSectionEnvironments(int x, int y, int z) Sends the environments of one chunk section to every player already tracking it.The packet is built off the world thread and sent when it is ready, so this returns before any player receives it. A player who is not tracking the section is skipped. The client discards environments for a section it does not hold, so an unloaded section costs nothing.
- Parameters:
x- chunk section x, in chunk coordinatesy- chunk section index, in section coordinatesz- chunk section z, in chunk coordinates
-
sendBlockParticle
public void sendBlockParticle(double x, double y, double z, int id, @Nonnull BlockParticleEvent particleType) -
sendBlockParticle
public void sendBlockParticle(@Nonnull PlayerRef playerRef, double x, double y, double z, int id, @Nonnull BlockParticleEvent particleType) -
sendPacketIfChunkLoaded
-
sendPacketIfChunkLoaded
-
getBlockParticlePacket
@Nonnull public SpawnBlockParticleSystem getBlockParticlePacket(double x, double y, double z, int id, @Nonnull BlockParticleEvent particleType)
-