Class SpawningHeightmap
java.lang.Object
com.pixelmonmod.pixelmon.api.spawning.util.SpawningHeightmap
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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 skystatic CompletableFuture<Integer>
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)
-
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)
-