Class LightRangePredicate
java.lang.Object
com.hypixel.hytale.server.spawning.util.LightRangePredicate
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byteprivate byteprivate byteprivate byteprivate byteprivate byteprivate byteprivate byteprivate byteprivate byteprivate byteprivate byteprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic bytecalculateLightValue(BlockChunk blockChunk, int x, int y, int z, double sunlightFactor) private booleanisPartialRange(byte min, byte max) booleanbooleanbooleanbooleanbooleanbooleanprivate bytelightPercentageToAbsolute(double light) static intlightToPrecentage(byte light) voidsetBlueLightRange(double[] lightRange) voidsetGreenLightRange(double[] lightRange) voidsetLightRange(double[] lightRange) voidsetLightRange(LightType type, double[] lightRange) voidsetRedLightRange(double[] lightRange) voidsetSkyLightRange(double[] lightRange) voidsetSunlightRange(double[] lightRange) private booleantest(byte lightValue, byte min, byte max) booleantest(BlockChunk blockChunk, int x, int y, int z, double sunlightFactor) booleantest(World world, Vector3d position, ComponentAccessor<EntityStore> componentAccessor) booleantestBlueLight(byte lightValue) booleantestGreenLight(byte lightValue) booleantestLight(byte lightValue) booleantestRedLight(byte lightValue) booleantestSkyLight(byte lightValue) booleantestSunlight(byte lightValue)
-
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
-
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
-
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)
-