Class ExpandLevelAccessor

java.lang.Object
com.blamejared.crafttweaker.natives.world.ExpandLevelAccessor

@ZenRegister public class ExpandLevelAccessor extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.world.DifficultyInstance
    getCurrentDifficultyAt(net.minecraft.world.level.LevelAccessor internal, net.minecraft.core.BlockPos position)
     
    static net.minecraft.world.Difficulty
    getDifficulty(net.minecraft.world.level.LevelAccessor internal)
    Gets the difficulty setting for the world.
    static net.minecraft.world.level.storage.LevelData
    getLevelData(net.minecraft.world.level.LevelAccessor internal)
    Gets the data for this level, holds information such as if it is raining, thundering, difficulty, etc
    static net.minecraft.util.RandomSource
    getRandom(net.minecraft.world.level.LevelAccessor internal)
     
    static void
    levelEvent(net.minecraft.world.level.LevelAccessor internal, int event, net.minecraft.core.BlockPos position, int extra)
    Triggers a predetermined event on the client.
    static void
    levelEvent(net.minecraft.world.level.LevelAccessor internal, net.minecraft.world.entity.player.Player excluded, int event, net.minecraft.core.BlockPos position, int extra)
    Triggers a predetermined event on the client.
    static void
    playSound(net.minecraft.world.level.LevelAccessor internal, net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos position, net.minecraft.sounds.SoundEvent event, net.minecraft.sounds.SoundSource source)
     
    static void
    playSound(net.minecraft.world.level.LevelAccessor internal, net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos position, net.minecraft.sounds.SoundEvent event, net.minecraft.sounds.SoundSource source, float volume, float pitch)
     

    Methods inherited from class java.lang.Object

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

    • ExpandLevelAccessor

      public ExpandLevelAccessor()
  • Method Details

    • getLevelData

      public static net.minecraft.world.level.storage.LevelData getLevelData(net.minecraft.world.level.LevelAccessor internal)
      Gets the data for this level, holds information such as if it is raining, thundering, difficulty, etc
      Returns:
      The data for this level
    • getCurrentDifficultyAt

      public static net.minecraft.world.DifficultyInstance getCurrentDifficultyAt(net.minecraft.world.level.LevelAccessor internal, net.minecraft.core.BlockPos position)
    • getDifficulty

      public static net.minecraft.world.Difficulty getDifficulty(net.minecraft.world.level.LevelAccessor internal)
      Gets the difficulty setting for the world.
      Returns:
      The difficulty setting for the world.
    • getRandom

      public static net.minecraft.util.RandomSource getRandom(net.minecraft.world.level.LevelAccessor internal)
    • playSound

      public static void playSound(net.minecraft.world.level.LevelAccessor internal, net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos position, net.minecraft.sounds.SoundEvent event, net.minecraft.sounds.SoundSource source)
    • playSound

      public static void playSound(net.minecraft.world.level.LevelAccessor internal, net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos position, net.minecraft.sounds.SoundEvent event, net.minecraft.sounds.SoundSource source, float volume, float pitch)
    • levelEvent

      public static void levelEvent(net.minecraft.world.level.LevelAccessor internal, net.minecraft.world.entity.player.Player excluded, int event, net.minecraft.core.BlockPos position, int extra)
      Triggers a predetermined event on the client. Using this on a server or integrated server will send the event to all nearby players.
      Parameters:
      excluded - An excluded player who will not receive the event.
      event - The ID of the event to play.
      position - The position of the event.
      extra - Four bytes of additional data encoded as an integer. This is generally unused.
      DocParam:
      excluded player, eventId 2005, pos new BlockPos(0, 1, 2), data 0
    • levelEvent

      public static void levelEvent(net.minecraft.world.level.LevelAccessor internal, int event, net.minecraft.core.BlockPos position, int extra)
      Triggers a predetermined event on the client. Using this on a server or integrated server will send the event to all nearby players.
      Parameters:
      event - The ID of the event to play.
      position - The position of the event.
      extra - Four bytes of additional data encoded as an integer. This is generally unused.
      DocParam:
      excluded player, eventId 2005, pos new BlockPos(0, 1, 2), data 0