Fixed implementation of RenderEntityItem.shouldSpreadItems. Closes #2448

This commit is contained in:
LexManos 2016-02-11 16:26:48 -08:00
parent 53301e1aeb
commit bd6af1e49a

View file

@ -9,27 +9,44 @@
float f2 = p_177077_9_.func_177552_f().func_181688_b(ItemCameraTransforms.TransformType.GROUND).field_178363_d.y; 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_); 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); GlStateManager.func_179152_a(0.5F, 0.5F, 0.5F);
- ibakedmodel.func_177552_f().func_181689_a(ItemCameraTransforms.TransformType.GROUND); - ibakedmodel.func_177552_f().func_181689_a(ItemCameraTransforms.TransformType.GROUND);
+ ibakedmodel = net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(ibakedmodel, ItemCameraTransforms.TransformType.GROUND); + ibakedmodel = net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(ibakedmodel, ItemCameraTransforms.TransformType.GROUND);
this.field_177080_a.func_180454_a(itemstack, ibakedmodel); this.field_177080_a.func_180454_a(itemstack, ibakedmodel);
GlStateManager.func_179121_F(); GlStateManager.func_179121_F();
} }
else - else
{ - {
GlStateManager.func_179094_E(); - GlStateManager.func_179094_E();
- ibakedmodel.func_177552_f().func_181689_a(ItemCameraTransforms.TransformType.GROUND); - 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);
this.field_177080_a.func_180454_a(itemstack, ibakedmodel); - GlStateManager.func_179121_F();
GlStateManager.func_179121_F(); - float f3 = ibakedmodel.func_177552_f().field_181699_o.field_178363_d.x;
+ // FIXME? - float f4 = ibakedmodel.func_177552_f().field_181699_o.field_178363_d.y;
float f3 = ibakedmodel.func_177552_f().field_181699_o.field_178363_d.x; - float f5 = ibakedmodel.func_177552_f().field_181699_o.field_178363_d.z;
float f4 = ibakedmodel.func_177552_f().field_181699_o.field_178363_d.y; - GlStateManager.func_179109_b(0.0F * f3, 0.0F * f4, 0.046875F * f5);
float f5 = ibakedmodel.func_177552_f().field_181699_o.field_178363_d.z; - }
@@ -157,4 +158,25 @@ }
GlStateManager.func_179121_F();
@@ -157,4 +146,25 @@
{ {
return TextureMap.field_110575_b; return TextureMap.field_110575_b;
} }