Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-50079

Blocks are not affected properly by explosions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • Minecraft 1.7.4, Minecraft 1.7.10, Minecraft 14w33c, Minecraft 14w34a, Minecraft 14w34b, Minecraft 14w34c, Minecraft 14w34d, Minecraft 1.8-pre1, Minecraft 1.8-pre2
    • None
    • Plausible

      This bug is in 1.7.2, and probably in all versions after as I have not seen it reported.

      Blocks are not affected properly by explosions due to the following error in the Entity class:

      Entity.java
      public float func_145772_a(Explosion p_145772_1_, World p_145772_2_, int p_145772_3_, int p_145772_4_, int p_145772_5_, Block p_145772_6_)
      {
              return p_145772_6_.getExplosionResistance(this, p_145772_2_, p_145772_3_, p_145772_3_, p_145772_4_, posX, posY + getEyeHeight(), posZ);
      }

      Notice that par3 is passed TWICE, as in (x, x, y) for the coordinates rather than (x, y, z).

      EDIT: By "not affected properly", I mean that the block's actual explosion resistance may not be taken into account, but instead will be calculated using a block at different coordinates.l

      For vanilla blocks, this is never noticed because par6 is a Block, so the correct block type is used to check explosion resistance and vanilla block explosion resistance does not depend on coordinates; to test, create a block that returns different explosion resistance based on its metadata state, and the issue will quickly become clear.

            searge [Mojang] Searge (Michael Stoyke)
            coolAlias Brian Sandall
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: