Class LightUtil
- java.lang.Object
-
- net.minecraftforge.client.model.pipeline.LightUtil
-
public class LightUtil extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LightUtil.ItemConsumer
private static class
LightUtil.ItemPipeline
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description LightUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static float
diffuseLight(float x, float y, float z)
static float
diffuseLight(Direction side)
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)
-
-
-
Field Detail
-
formatMaps
private static final java.util.concurrent.ConcurrentMap<org.apache.commons.lang3.tuple.Pair<VertexFormat,VertexFormat>,int[]> formatMaps
-
DEFAULT_FROM
private static final VertexFormat DEFAULT_FROM
-
DEFAULT_TO
private static final VertexFormat DEFAULT_TO
-
DEFAULT_MAPPING
private static final int[] DEFAULT_MAPPING
-
itemPipeline
private static final java.lang.ThreadLocal<LightUtil.ItemPipeline> itemPipeline
-
-
Method Detail
-
diffuseLight
public static float diffuseLight(float x, float y, float z)
-
diffuseLight
public static float diffuseLight(Direction side)
-
toSide
public static Direction toSide(float x, float y, float z)
-
putBakedQuad
public static void putBakedQuad(IVertexConsumer consumer, BakedQuad quad)
-
mapFormats
public static int[] mapFormats(VertexFormat from, VertexFormat to)
-
generateMapping
private static int[] generateMapping(VertexFormat from, VertexFormat to)
-
unpack
public static void unpack(int[] from, float[] to, VertexFormat formatFrom, int v, int e)
-
pack
public static void pack(float[] from, int[] to, VertexFormat formatTo, int v, int e)
-
getLightOffset
public static int getLightOffset(int v)
-
setLightData
public static void setLightData(BakedQuad q, int light)
-
-