mojira.dev

Socolin

Assigned

No issues.

Reported

MC-4374 Crash with receiving packet 56 when using high IDs for blocks Invalid

Comments

There is another redered useless face

[media]

--- a/minecraft/models/block/inner_stairs.json
+++ b/minecraft/models/block/inner_stairs.json
@@ -30,8 +30,7 @@
                 "up":    { "uv": [ 0, 8,  8, 16 ], "texture": "#top", "cullface": "up" },
                 "north": { "uv": [ 8, 0, 16,  8 ], "texture": "#side" },
                 "south": { "uv": [ 0, 0,  8,  8 ], "texture": "#side", "cullface": "south" },
-                "west":  { "uv": [ 8, 0, 16,  8 ], "texture": "#side", "cullface": "west" },
-                "east":  { "uv": [ 0, 0,  8,  8 ], "texture": "#side", "cullface": "east" }
+                "west":  { "uv": [ 8, 0, 16,  8 ], "texture": "#side", "cullface": "west" }
             }
         }
     ]

The bottom should not be removed

For the side I don't know if the fence can stick to a non full/opaque cube, but maybe they can be removed

Fences have lot of non visible faces rendered too, model is ok, in code shouldRenderFace = {render true} just remove it and it's ok

@James Taylor Flores:
This should fix the problem (if someone want to make a mod with it, feel free) (patch for mcp 1.8.0 code)

diff --git a/minecraft/net/minecraft/entity/EntityHanging.java b/minecraft/net/minecraft/entity/EntityHanging.java
--- a/minecraft/net/minecraft/entity/EntityHanging.java
+++ b/minecraft/net/minecraft/entity/EntityHanging.java
@@ -118,12 +118,14 @@ public abstract class EntityHanging exte
             BlockPos var3 = this.hangingPosition.offset(this.field_174860_b.getOpposite());
             EnumFacing var4 = this.field_174860_b.rotateYCCW();
 
-            for (int var5 = 0; var5 < var1; ++var5)
+            for (int var5 = 0; var5 < var1; var5++)
             {
                 for (int var6 = 0; var6 < var2; ++var6)
                 {
-                    BlockPos var7 = var3.offset(var4, var5).up(var6);
-                    Block var8 = this.worldObj.getBlockState(var7).getBlock();
+                    int offsetX = var5 - ((this.getWidthPixels() - 1) / 32);
+                    int offsetY = var6 - ((this.getHeightPixels() - 1) / 32);
+                    BlockPos blockPos = var3.offset(var4, offsetX).up(offsetY);
+                    Block var8 = this.worldObj.getBlockState(blockPos).getBlock();
 
                     if (!var8.getMaterial().isSolid() && !BlockRedstoneDiode.isRedstoneRepeaterBlockID(var8))
                     {

The rotation is compute from world time, in multiplayer, this is send by the server...