Class VillageSiegeEvent

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.village.VillageSiegeEvent
All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent

public class VillageSiegeEvent extends net.neoforged.bus.api.Event implements net.neoforged.bus.api.ICancellableEvent
VillageSiegeEvent is fired just before a zombie siege finds a successful location in VillageSiege#tryToSetupSiege(ServerLevel), to give mods the chance to stop the siege.

This event is ICancellableEvent; canceling stops the siege.

This event does not have a result.
invalid reference
HasResult


This event is fired on the NeoForge.EVENT_BUS.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final net.minecraft.world.phys.Vec3
     
    private final net.minecraft.world.level.Level
     
    private final net.minecraft.world.entity.player.Player
     
    private final net.minecraft.world.entity.ai.village.VillageSiege
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    VillageSiegeEvent(net.minecraft.world.entity.ai.village.VillageSiege siege, net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, net.minecraft.world.phys.Vec3 attemptedSpawnPos)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.phys.Vec3
     
    net.minecraft.world.level.Level
     
    net.minecraft.world.entity.player.Player
     
    net.minecraft.world.entity.ai.village.VillageSiege
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.neoforged.bus.api.ICancellableEvent

    isCanceled, setCanceled
  • Field Details

    • siege

      private final net.minecraft.world.entity.ai.village.VillageSiege siege
    • level

      private final net.minecraft.world.level.Level level
    • player

      private final net.minecraft.world.entity.player.Player player
    • attemptedSpawnPos

      private final net.minecraft.world.phys.Vec3 attemptedSpawnPos
  • Constructor Details

    • VillageSiegeEvent

      public VillageSiegeEvent(net.minecraft.world.entity.ai.village.VillageSiege siege, net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, net.minecraft.world.phys.Vec3 attemptedSpawnPos)
  • Method Details

    • getSiege

      public net.minecraft.world.entity.ai.village.VillageSiege getSiege()
    • getLevel

      public net.minecraft.world.level.Level getLevel()
    • getPlayer

      public net.minecraft.world.entity.player.Player getPlayer()
    • getAttemptedSpawnPos

      public net.minecraft.world.phys.Vec3 getAttemptedSpawnPos()