LightRangePredicate

public class LightRangePredicate

Class LightRangePredicate. Provides lightrangepredicate functionality for the Hytale server.

java.lang.Object > LightRangePredicate

Field Summary

lightValueMin

private byte lightValueMin

Field lightValueMin.

lightValueMax

private byte lightValueMax

Field lightValueMax.

skyLightValueMin

private byte skyLightValueMin

Field skyLightValueMin.

skyLightValueMax

private byte skyLightValueMax

Field skyLightValueMax.

sunlightValueMin

private byte sunlightValueMin

Field sunlightValueMin.

sunlightValueMax

private byte sunlightValueMax

Field sunlightValueMax.

redLightValueMin

private byte redLightValueMin

Field redLightValueMin.

redLightValueMax

private byte redLightValueMax

Field redLightValueMax.

greenLightValueMin

private byte greenLightValueMin

Field greenLightValueMin.

greenLightValueMax

private byte greenLightValueMax

Field greenLightValueMax.

blueLightValueMin

private byte blueLightValueMin

Field blueLightValueMin.

blueLightValueMax

private byte blueLightValueMax

Field blueLightValueMax.

testLightValue

private boolean testLightValue

Field testLightValue.

testSkyLightValue

private boolean testSkyLightValue

Field testSkyLightValue.

testSunlightValue

private boolean testSunlightValue

Field testSunlightValue.

testRedLightValue

private boolean testRedLightValue

Field testRedLightValue.

testGreenLightValue

private boolean testGreenLightValue

Field testGreenLightValue.

testBlueLightValue

private boolean testBlueLightValue

Field testBlueLightValue.

x

final int x

Field x.

y

final int y

Field y.

z

final int z

Field z.

worldTimeResource

final WorldTimeResource worldTimeResource

Field worldTimeResource.

chunk

final WorldChunk chunk

Field chunk.

maxLight

final byte maxLight

Field maxLight.

lightValue

final byte lightValue

Field lightValue.

skyLightValue

final byte skyLightValue

Field skyLightValue.

Method Detail

lightToPrecentage

static int lightToPrecentage (final byte light)

Method lightToPrecentage.

Parameters:
final byte light

setLightRange

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

Method setLightRange.

Parameters:
@Nonnull final LightType type
final double[] lightRange

setSkyLightRange

public void setSkyLightRange (@Nullable final double[] lightRange)

Method setSkyLightRange.

Parameters:
@Nullable final double[] lightRange

setSunlightRange

public void setSunlightRange (@Nullable final double[] lightRange)

Method setSunlightRange.

Parameters:
@Nullable final double[] lightRange

setRedLightRange

public void setRedLightRange (@Nullable final double[] lightRange)

Method setRedLightRange.

Parameters:
@Nullable final double[] lightRange

setGreenLightRange

public void setGreenLightRange (@Nullable final double[] lightRange)

Method setGreenLightRange.

Parameters:
@Nullable final double[] lightRange

setBlueLightRange

public void setBlueLightRange (@Nullable final double[] lightRange)

Method setBlueLightRange.

Parameters:
@Nullable final double[] lightRange

isTestLightValue

public boolean isTestLightValue ()

Method isTestLightValue.

isTestSkyLightValue

public boolean isTestSkyLightValue ()

Method isTestSkyLightValue.

isTestSunlightValue

public boolean isTestSunlightValue ()

Method isTestSunlightValue.

isTestRedLightValue

public boolean isTestRedLightValue ()

Method isTestRedLightValue.

isTestGreenLightValue

public boolean isTestGreenLightValue ()

Method isTestGreenLightValue.

isTestBlueLightValue

public boolean isTestBlueLightValue ()

Method isTestBlueLightValue.

test

public boolean test (@Nonnull final World world, @Nonnull final Vector3d position, @Nonnull final ComponentAccessor componentAccessor)

Method test.

Parameters:
@Nonnull final World world
@Nonnull final Vector3d position
@Nonnull final ComponentAccessor componentAccessor

testLight

public boolean testLight (final byte lightValue)

Method testLight.

Parameters:
final byte lightValue

testSkyLight

public boolean testSkyLight (final byte lightValue)

Method testSkyLight.

Parameters:
final byte lightValue

testSunlight

public boolean testSunlight (final byte lightValue)

Method testSunlight.

Parameters:
final byte lightValue

testRedLight

public boolean testRedLight (final byte lightValue)

Method testRedLight.

Parameters:
final byte lightValue

testGreenLight

public boolean testGreenLight (final byte lightValue)

Method testGreenLight.

Parameters:
final byte lightValue

testBlueLight

public boolean testBlueLight (final byte lightValue)

Method testBlueLight.

Parameters:
final byte lightValue

calculateLightValue

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

Method calculateLightValue.

Parameters:
@Nonnull final BlockChunk blockChunk
final int x
final int y
final int z
final double sunlightFactor

lightPercentageToAbsolute

private byte lightPercentageToAbsolute (final double light)

Method lightPercentageToAbsolute.

Parameters:
final double light

isPartialRange

private boolean isPartialRange (final byte min, final byte max)

Method isPartialRange.

Parameters:
final byte min
final byte max