Class SpawningHeightmap

java.lang.Object
com.pixelmonmod.pixelmon.api.spawning.util.SpawningHeightmap

public class SpawningHeightmap extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    blockUpdate(net.minecraftforge.event.level.BlockEvent.NeighborNotifyEvent event)
     
    static boolean
    canSeeSky(net.minecraft.core.BlockPos pos, net.minecraft.world.level.Level world)
    Convenience method for checking if a given block can see the sky
    getHeight(net.minecraft.core.BlockPos pos, net.minecraft.world.level.Level world)
    Finds the height of the surface for the given position.
    static void
    loadSpawningHeightmap(net.minecraftforge.event.level.ChunkDataEvent.Load event)
     
    static void
    onChunkUnload(net.minecraftforge.event.level.ChunkEvent.Unload event)
     
    static void
    saveSpawningHeightmap(net.minecraftforge.event.level.ChunkDataEvent.Save event)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SpawningHeightmap

      public SpawningHeightmap()
  • Method Details

    • canSeeSky

      public static boolean canSeeSky(net.minecraft.core.BlockPos pos, net.minecraft.world.level.Level world)
      Convenience method for checking if a given block can see the sky
      Parameters:
      pos - The position of the block to start at.
      world - The world that the block is in.
      Returns:
      Whether the block can see the sky
    • getHeight

      public static CompletableFuture<Integer> getHeight(net.minecraft.core.BlockPos pos, net.minecraft.world.level.Level world)
      Finds the height of the surface for the given position.
      Parameters:
      pos - The position of the block to start at.
      world - The world that the block is in.
      Returns:
      The height of the surface at the given position
    • blockUpdate

      public static void blockUpdate(net.minecraftforge.event.level.BlockEvent.NeighborNotifyEvent event)
    • loadSpawningHeightmap

      public static void loadSpawningHeightmap(net.minecraftforge.event.level.ChunkDataEvent.Load event)
    • saveSpawningHeightmap

      public static void saveSpawningHeightmap(net.minecraftforge.event.level.ChunkDataEvent.Save event)
    • onChunkUnload

      public static void onChunkUnload(net.minecraftforge.event.level.ChunkEvent.Unload event)