Class WorldUtil

java.lang.Object
my.celium.org.util.WorldUtil

public final class WorldUtil extends Object
Small cohesive world/level helpers.
  • Method Summary

    Modifier and Type
    Method
    Description
    static long
    gameTime(net.minecraft.server.level.ServerLevel level)
    Current game time in ticks.
    static net.minecraft.world.level.block.state.BlockState
    getBlockState(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
     
    static List<net.minecraft.server.level.ServerPlayer>
    getPlayers(net.minecraft.server.level.ServerLevel level)
    All players on a server level.
    static boolean
    isChunkLoaded(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
    Whether the chunk containing pos is loaded (never forces a load).
    static boolean
    isClientSide(net.minecraft.world.level.Level level)
     
    static boolean
    setBlock(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
     

    Methods inherited from class Object

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

    • isClientSide

      public static boolean isClientSide(net.minecraft.world.level.Level level)
    • isChunkLoaded

      public static boolean isChunkLoaded(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
      Whether the chunk containing pos is loaded (never forces a load).
    • getBlockState

      public static net.minecraft.world.level.block.state.BlockState getBlockState(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
    • setBlock

      public static boolean setBlock(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
    • getPlayers

      public static List<net.minecraft.server.level.ServerPlayer> getPlayers(net.minecraft.server.level.ServerLevel level)
      All players on a server level.
    • gameTime

      public static long gameTime(net.minecraft.server.level.ServerLevel level)
      Current game time in ticks.