Class LightRangePredicate

java.lang.Object
com.hypixel.hytale.server.spawning.util.LightRangePredicate

public class LightRangePredicate extends Object
  • Field Details

    • lightValueMin

      private byte lightValueMin
    • lightValueMax

      private byte lightValueMax
    • skyLightValueMin

      private byte skyLightValueMin
    • skyLightValueMax

      private byte skyLightValueMax
    • sunlightValueMin

      private byte sunlightValueMin
    • sunlightValueMax

      private byte sunlightValueMax
    • redLightValueMin

      private byte redLightValueMin
    • redLightValueMax

      private byte redLightValueMax
    • greenLightValueMin

      private byte greenLightValueMin
    • greenLightValueMax

      private byte greenLightValueMax
    • blueLightValueMin

      private byte blueLightValueMin
    • blueLightValueMax

      private byte blueLightValueMax
    • testLightValue

      private boolean testLightValue
    • testSkyLightValue

      private boolean testSkyLightValue
    • testSunlightValue

      private boolean testSunlightValue
    • testRedLightValue

      private boolean testRedLightValue
    • testGreenLightValue

      private boolean testGreenLightValue
    • testBlueLightValue

      private boolean testBlueLightValue
  • Constructor Details

    • LightRangePredicate

      public LightRangePredicate()
  • Method Details

    • lightToPrecentage

      public static int lightToPrecentage(byte light)
    • setLightRange

      public void setLightRange(@Nonnull LightType type, double[] lightRange)
    • setLightRange

      public void setLightRange(@Nullable double[] lightRange)
    • setSkyLightRange

      public void setSkyLightRange(@Nullable double[] lightRange)
    • setSunlightRange

      public void setSunlightRange(@Nullable double[] lightRange)
    • setRedLightRange

      public void setRedLightRange(@Nullable double[] lightRange)
    • setGreenLightRange

      public void setGreenLightRange(@Nullable double[] lightRange)
    • setBlueLightRange

      public void setBlueLightRange(@Nullable double[] lightRange)
    • isTestLightValue

      public boolean isTestLightValue()
    • isTestSkyLightValue

      public boolean isTestSkyLightValue()
    • isTestSunlightValue

      public boolean isTestSunlightValue()
    • isTestRedLightValue

      public boolean isTestRedLightValue()
    • isTestGreenLightValue

      public boolean isTestGreenLightValue()
    • isTestBlueLightValue

      public boolean isTestBlueLightValue()
    • test

      public boolean test(@Nonnull World world, @Nonnull Vector3d position, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • test

      public boolean test(@Nullable BlockChunk blockChunk, int x, int y, int z, double sunlightFactor)
    • testLight

      public boolean testLight(byte lightValue)
    • testSkyLight

      public boolean testSkyLight(byte lightValue)
    • testSunlight

      public boolean testSunlight(byte lightValue)
    • testRedLight

      public boolean testRedLight(byte lightValue)
    • testGreenLight

      public boolean testGreenLight(byte lightValue)
    • testBlueLight

      public boolean testBlueLight(byte lightValue)
    • calculateLightValue

      public static byte calculateLightValue(@Nonnull BlockChunk blockChunk, int x, int y, int z, double sunlightFactor)
    • test

      private boolean test(byte lightValue, byte min, byte max)
    • lightPercentageToAbsolute

      private byte lightPercentageToAbsolute(double light)
    • isPartialRange

      private boolean isPartialRange(byte min, byte max)