From bd6af1e49ae94e892680bb0d20a90f81ccb507d7 Mon Sep 17 00:00:00 2001 From: LexManos Date: Thu, 11 Feb 2016 16:26:48 -0800 Subject: [PATCH] Fixed implementation of RenderEntityItem.shouldSpreadItems. Closes #2448 --- .../entity/RenderEntityItem.java.patch | 41 +++++++++++++------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/patches/minecraft/net/minecraft/client/renderer/entity/RenderEntityItem.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/RenderEntityItem.java.patch index 1a8198bab..155cd7b44 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/RenderEntityItem.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/RenderEntityItem.java.patch @@ -9,27 +9,44 @@ float f2 = p_177077_9_.func_177552_f().func_181688_b(ItemCameraTransforms.TransformType.GROUND).field_178363_d.y; GlStateManager.func_179109_b((float)p_177077_2_, (float)p_177077_4_ + f1 + 0.25F * f2, (float)p_177077_6_); -@@ -123,16 +123,17 @@ +@@ -110,7 +110,6 @@ + + for (int j = 0; j < i; ++j) + { +- if (ibakedmodel.func_177556_c()) + { + GlStateManager.func_179094_E(); + +@@ -119,25 +118,15 @@ + float f = (this.field_177079_e.nextFloat() * 2.0F - 1.0F) * 0.15F; + float f1 = (this.field_177079_e.nextFloat() * 2.0F - 1.0F) * 0.15F; + float f2 = (this.field_177079_e.nextFloat() * 2.0F - 1.0F) * 0.15F; +- GlStateManager.func_179109_b(f, f1, f2); ++ GlStateManager.func_179109_b(shouldSpreadItems() ? f : 0.0F, shouldSpreadItems() ? f1 : 0.0F, f2); } ++ if (ibakedmodel.func_177556_c()) GlStateManager.func_179152_a(0.5F, 0.5F, 0.5F); - ibakedmodel.func_177552_f().func_181689_a(ItemCameraTransforms.TransformType.GROUND); + ibakedmodel = net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(ibakedmodel, ItemCameraTransforms.TransformType.GROUND); this.field_177080_a.func_180454_a(itemstack, ibakedmodel); GlStateManager.func_179121_F(); } - else - { - GlStateManager.func_179094_E(); +- else +- { +- GlStateManager.func_179094_E(); - ibakedmodel.func_177552_f().func_181689_a(ItemCameraTransforms.TransformType.GROUND); -+ ibakedmodel = net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(ibakedmodel, ItemCameraTransforms.TransformType.GROUND); - this.field_177080_a.func_180454_a(itemstack, ibakedmodel); - GlStateManager.func_179121_F(); -+ // FIXME? - float f3 = ibakedmodel.func_177552_f().field_181699_o.field_178363_d.x; - float f4 = ibakedmodel.func_177552_f().field_181699_o.field_178363_d.y; - float f5 = ibakedmodel.func_177552_f().field_181699_o.field_178363_d.z; -@@ -157,4 +158,25 @@ +- this.field_177080_a.func_180454_a(itemstack, ibakedmodel); +- GlStateManager.func_179121_F(); +- float f3 = ibakedmodel.func_177552_f().field_181699_o.field_178363_d.x; +- float f4 = ibakedmodel.func_177552_f().field_181699_o.field_178363_d.y; +- float f5 = ibakedmodel.func_177552_f().field_181699_o.field_178363_d.z; +- GlStateManager.func_179109_b(0.0F * f3, 0.0F * f4, 0.046875F * f5); +- } + } + + GlStateManager.func_179121_F(); +@@ -157,4 +146,25 @@ { return TextureMap.field_110575_b; }