mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 05:59:53 +03:00
55 lines
1.9 KiB
Diff
55 lines
1.9 KiB
Diff
--- ../src-base/minecraft/net/minecraft/client/renderer/block/model/BakedQuad.java
|
|
+++ ../src-work/minecraft/net/minecraft/client/renderer/block/model/BakedQuad.java
|
|
@@ -6,15 +6,26 @@
|
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
-public class BakedQuad
|
|
+public class BakedQuad implements net.minecraftforge.client.model.pipeline.IVertexProducer
|
|
{
|
|
protected final int[] vertexData;
|
|
protected final int tintIndex;
|
|
protected final EnumFacing face;
|
|
protected final TextureAtlasSprite sprite;
|
|
|
|
+ /**
|
|
+ * @deprecated Use constructor with the format argument.
|
|
+ */
|
|
+ @Deprecated
|
|
public BakedQuad(int[] vertexDataIn, int tintIndexIn, EnumFacing faceIn, TextureAtlasSprite spriteIn)
|
|
{
|
|
+ this(vertexDataIn, tintIndexIn, faceIn, spriteIn, true, net.minecraft.client.renderer.vertex.DefaultVertexFormats.ITEM);
|
|
+ }
|
|
+
|
|
+ public BakedQuad(int[] vertexDataIn, int tintIndexIn, EnumFacing faceIn, TextureAtlasSprite spriteIn, boolean applyDiffuseLighting, net.minecraft.client.renderer.vertex.VertexFormat format)
|
|
+ {
|
|
+ this.format = format;
|
|
+ this.applyDiffuseLighting = applyDiffuseLighting;
|
|
this.vertexData = vertexDataIn;
|
|
this.tintIndex = tintIndexIn;
|
|
this.face = faceIn;
|
|
@@ -45,4 +56,23 @@
|
|
{
|
|
return this.face;
|
|
}
|
|
+
|
|
+ protected final net.minecraft.client.renderer.vertex.VertexFormat format;
|
|
+ protected final boolean applyDiffuseLighting;
|
|
+
|
|
+ @Override
|
|
+ public void pipe(net.minecraftforge.client.model.pipeline.IVertexConsumer consumer)
|
|
+ {
|
|
+ net.minecraftforge.client.model.pipeline.LightUtil.putBakedQuad(consumer, this);
|
|
+ }
|
|
+
|
|
+ public net.minecraft.client.renderer.vertex.VertexFormat getFormat()
|
|
+ {
|
|
+ return format;
|
|
+ }
|
|
+
|
|
+ public boolean shouldApplyDiffuseLighting()
|
|
+ {
|
|
+ return applyDiffuseLighting;
|
|
+ }
|
|
}
|