Mojira Archive
MC-11814

Code flaw in the World class

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.

Incomplete

Hesham A. Meneisi

2013-03-14, 09:09 PM

2014-02-27, 04:31 PM

2014-02-27, 04:31 PM

0

3

Unconfirmed

code, spawn, world

Minecraft 1.4.7, Minecraft 1.5, Snapshot 13w11a, Minecraft 1.7.2

-