Class EnvironmentBreakBlockEvent

java.lang.Object
com.hypixel.hytale.component.system.EcsEvent
com.hypixel.hytale.server.core.event.events.ecs.EnvironmentBreakBlockEvent

public class EnvironmentBreakBlockEvent extends EcsEvent
A world-level event fired when a block is broken by an environmental source with no instigating entity, such as fire consuming a flammable block or an unattributed explosion.

Unlike BreakBlockEvent, this carries no actor and is not cancellable: the simulation has already decided to remove the block. It exists so listeners that react to player breaks (e.g. trigger volumes) can also react to environmental ones.

  • Constructor Details

    • EnvironmentBreakBlockEvent

      public EnvironmentBreakBlockEvent(@Nonnull org.joml.Vector3i targetBlock, @Nonnull BlockType blockType)
      Default Constructor for an EnvironmentBreakBlockEvent instance.
      Parameters:
      targetBlock - The position of the block that was broken.
      blockType - The BlockType of the block that was broken.
  • Method Details

    • getTargetBlock

      @Nonnull public org.joml.Vector3i getTargetBlock()
      Returns:
      the position of the block that was broken.
    • getBlockType

      @Nonnull public BlockType getBlockType()
      Returns:
      the BlockType of the block that was broken.