--- a/net/minecraft/client/renderer/block/model/BakedQuad.java +++ b/net/minecraft/client/renderer/block/model/BakedQuad.java @@ -6,13 +6,23 @@ import net.minecraftforge.api.distmarker.OnlyIn; @OnlyIn(Dist.CLIENT) -public class BakedQuad { +public class BakedQuad implements net.minecraftforge.client.model.pipeline.IVertexProducer { protected final int[] field_178215_a; protected final int field_178213_b; protected final EnumFacing field_178214_c; protected final TextureAtlasSprite field_187509_d; + /** + * @deprecated Use constructor with the format argument. + */ + @Deprecated public BakedQuad(int[] p_i46574_1_, int p_i46574_2_, EnumFacing p_i46574_3_, TextureAtlasSprite p_i46574_4_) { + this(p_i46574_1_, p_i46574_2_, p_i46574_3_, p_i46574_4_, true, net.minecraft.client.renderer.vertex.DefaultVertexFormats.field_176600_a); + } + + public BakedQuad(int[] p_i46574_1_, int p_i46574_2_, EnumFacing p_i46574_3_, TextureAtlasSprite p_i46574_4_, boolean applyDiffuseLighting, net.minecraft.client.renderer.vertex.VertexFormat format) { + this.format = format; + this.applyDiffuseLighting = applyDiffuseLighting; this.field_178215_a = p_i46574_1_; this.field_178213_b = p_i46574_2_; this.field_178214_c = p_i46574_3_; @@ -38,4 +48,20 @@ public EnumFacing func_178210_d() { return this.field_178214_c; } + + 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; + } +}