Interface LevelFunction

All Known Implementing Classes:
ArithmeticFunction, ConstantFunction, CurveFunction, DispatchableFunction, LightFunction, MercuryTemperatureFunction, TimeFunction

@ParametersAreNonnullByDefault public interface LevelFunction
  • Field Details

    • REGISTRY

      static final SimpleRegistry<net.minecraft.resources.ResourceLocation,com.mojang.serialization.MapCodec<? extends LevelFunction>> REGISTRY
    • CODEC_NO_INLINE

      static final com.mojang.serialization.Codec<LevelFunction> CODEC_NO_INLINE
    • CODEC

      static final com.mojang.serialization.Codec<LevelFunction> CODEC
  • Method Details

    • type

      net.minecraft.resources.ResourceLocation type()
    • get

      float get(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
    • register

      @Internal static void register()
    • add

      @Contract(value="_ -> new", pure=true) default LevelFunction add(LevelFunction other)
    • sub

      @Contract(value="_ -> new", pure=true) default LevelFunction sub(LevelFunction other)
    • mul

      @Contract(value="_ -> new", pure=true) default LevelFunction mul(LevelFunction other)
    • div

      @Contract(value="_ -> new", pure=true) default LevelFunction div(LevelFunction other)
    • constant

      @Contract(value="_ -> new", pure=true) static LevelFunction constant(float value)
    • light

      @Contract(value="_, _ -> new", pure=true) static LevelFunction light(LightFunction.Mode mode, boolean normalize)
    • time

      @Contract(value="_, _ -> new", pure=true) static LevelFunction time(boolean wrap, boolean normalize)