public class LightUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
LightUtil.ItemConsumer |
private static class |
LightUtil.ItemPipeline |
Modifier and Type | Field and Description |
---|---|
private static VertexFormat |
DEFAULT_FROM |
private static int[] |
DEFAULT_MAPPING |
private static VertexFormat |
DEFAULT_TO |
private static java.util.concurrent.ConcurrentMap<org.apache.commons.lang3.tuple.Pair<VertexFormat,VertexFormat>,int[]> |
formatMaps |
private static java.lang.ThreadLocal<LightUtil.ItemPipeline> |
itemPipeline |
Constructor and Description |
---|
LightUtil() |
Modifier and Type | Method and Description |
---|---|
static float |
diffuseLight(Direction side) |
static float |
diffuseLight(float x,
float y,
float z) |
private static int[] |
generateMapping(VertexFormat from,
VertexFormat to) |
static int |
getLightOffset(int v) |
static int[] |
mapFormats(VertexFormat from,
VertexFormat to) |
static void |
pack(float[] from,
int[] to,
VertexFormat formatTo,
int v,
int e) |
static void |
putBakedQuad(IVertexConsumer consumer,
BakedQuad quad) |
static void |
setLightData(BakedQuad q,
int light) |
static Direction |
toSide(float x,
float y,
float z) |
static void |
unpack(int[] from,
float[] to,
VertexFormat formatFrom,
int v,
int e) |
private static final java.util.concurrent.ConcurrentMap<org.apache.commons.lang3.tuple.Pair<VertexFormat,VertexFormat>,int[]> formatMaps
private static final VertexFormat DEFAULT_FROM
private static final VertexFormat DEFAULT_TO
private static final int[] DEFAULT_MAPPING
private static final java.lang.ThreadLocal<LightUtil.ItemPipeline> itemPipeline
public static float diffuseLight(float x, float y, float z)
public static float diffuseLight(Direction side)
public static Direction toSide(float x, float y, float z)
public static void putBakedQuad(IVertexConsumer consumer, BakedQuad quad)
public static int[] mapFormats(VertexFormat from, VertexFormat to)
private static int[] generateMapping(VertexFormat from, VertexFormat to)
public static void unpack(int[] from, float[] to, VertexFormat formatFrom, int v, int e)
public static void pack(float[] from, int[] to, VertexFormat formatTo, int v, int e)
public static int getLightOffset(int v)
public static void setLightData(BakedQuad q, int light)