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

Code flaw in the World class

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • None
    • Minecraft 1.4.7, Minecraft 1.5, Snapshot 13w11a, Minecraft 1.7.2
    • Windows
    • Unconfirmed

      In the 'World' class the getTopSolidOrLiquidBlock function returns the top solid block only and ignores liquid blocks. For example, the player could spawn under water or lava.

      Currently, the condition for a valid block is:
      (blockid != 0 && blockMaterial.blocksMovement() && blockMaterial != Material.leaves)

      blocksMovement() does not apply to liquids.

      The 'Material' class already has functions called isLiquid() and isSolid()

      Edit: It also doesn't return the coordinates of the found block, it augments the Y axis by 1 first.

            Unassigned Unassigned
            hesham4488 Hesham A. Meneisi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: