Class BlockEvent.PortalSpawnEvent

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.level.BlockEvent
net.neoforged.neoforge.event.level.BlockEvent.PortalSpawnEvent
All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
Enclosing class:
BlockEvent

public static class BlockEvent.PortalSpawnEvent extends BlockEvent implements net.neoforged.bus.api.ICancellableEvent
Fired when an attempt is made to spawn a nether portal from BaseFireBlock.onPlace(BlockState, Level, BlockPos, BlockState, boolean). If cancelled, the portal will not be spawned.
  • Field Details

    • size

      private final net.minecraft.world.level.portal.PortalShape size
  • Constructor Details

    • PortalSpawnEvent

      public PortalSpawnEvent(net.minecraft.world.level.LevelAccessor level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.portal.PortalShape size)
  • Method Details

    • getPortalSize

      public net.minecraft.world.level.portal.PortalShape getPortalSize()