Class WorldNotificationHandler

java.lang.Object
com.hypixel.hytale.server.core.universe.world.WorldNotificationHandler

public class WorldNotificationHandler extends Object
Handler for world notifications, such as block updates and particle effects.
  • Constructor Details

    • WorldNotificationHandler

      public WorldNotificationHandler(@Nonnull World world)
      Default Constructor for a WorldNotificationHandler instance.
      Parameters:
      world - The World instance 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 coordinates
      y - chunk section index, in section coordinates
      z - 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

      public void sendPacketIfChunkLoaded(@Nonnull ToClientPacket packet, int x, int z)
    • sendPacketIfChunkLoaded

      public void sendPacketIfChunkLoaded(@Nonnull ToClientPacket packet, long indexChunk)
    • getBlockParticlePacket

      @Nonnull public SpawnBlockParticleSystem getBlockParticlePacket(double x, double y, double z, int id, @Nonnull BlockParticleEvent particleType)