Prefer these.

This commit is contained in:
asofold 2012-11-11 16:11:23 +01:00
parent 9f25bff64c
commit cf99770902

View File

@ -1096,7 +1096,7 @@ public class BlockProperties {
final int iMaxX = Location.locToBlock(maxX); final int iMaxX = Location.locToBlock(maxX);
// At least find fences etc. if searched for. // At least find fences etc. if searched for.
// TODO: this is a bit difficult ... // TODO: this is a bit difficult ...
final int iMinY = Location.locToBlock(minY - (flags & F_HEIGHT150) != 0 ? 0.5625 : 0); final int iMinY = Location.locToBlock(minY - ((flags & F_HEIGHT150) != 0 ? 0.5625 : 0));
final int iMaxY = Location.locToBlock(maxY); final int iMaxY = Location.locToBlock(maxY);
final int iMinZ = Location.locToBlock(minZ); final int iMinZ = Location.locToBlock(minZ);
final int iMaxZ = Location.locToBlock(maxZ); final int iMaxZ = Location.locToBlock(maxZ);
@ -1129,7 +1129,7 @@ public class BlockProperties {
public static final boolean collidesId(final IBlockAccess access, final double minX, double minY, final double minZ, final double maxX, final double maxY, final double maxZ, final int id){ public static final boolean collidesId(final IBlockAccess access, final double minX, double minY, final double minZ, final double maxX, final double maxY, final double maxZ, final int id){
final int iMinX = Location.locToBlock(minX); final int iMinX = Location.locToBlock(minX);
final int iMaxX = Location.locToBlock(maxX); final int iMaxX = Location.locToBlock(maxX);
final int iMinY = Location.locToBlock(minY - (blockFlags[id] & F_HEIGHT150) != 0 ? 0.5625 : 0); final int iMinY = Location.locToBlock(minY - ((blockFlags[id] & F_HEIGHT150) != 0 ? 0.5625 : 0));
final int iMaxY = Location.locToBlock(maxY); final int iMaxY = Location.locToBlock(maxY);
final int iMinZ = Location.locToBlock(minZ); final int iMinZ = Location.locToBlock(minZ);
final int iMaxZ = Location.locToBlock(maxZ); final int iMaxZ = Location.locToBlock(maxZ);
@ -1160,7 +1160,7 @@ public class BlockProperties {
public static final boolean collidesBlock(final IBlockAccess access, final double minX, double minY, final double minZ, final double maxX, final double maxY, final double maxZ, final int id){ public static final boolean collidesBlock(final IBlockAccess access, final double minX, double minY, final double minZ, final double maxX, final double maxY, final double maxZ, final int id){
final int iMinX = Location.locToBlock(minX); final int iMinX = Location.locToBlock(minX);
final int iMaxX = Location.locToBlock(maxX); final int iMaxX = Location.locToBlock(maxX);
final int iMinY = Location.locToBlock(minY - (blockFlags[id] & F_HEIGHT150) != 0 ? 0.5625 : 0); final int iMinY = Location.locToBlock(minY - ((blockFlags[id] & F_HEIGHT150) != 0 ? 0.5625 : 0));
final int iMaxY = Location.locToBlock(maxY); final int iMaxY = Location.locToBlock(maxY);
final int iMinZ = Location.locToBlock(minZ); final int iMinZ = Location.locToBlock(minZ);
final int iMaxZ = Location.locToBlock(maxZ); final int iMaxZ = Location.locToBlock(maxZ);
@ -1208,7 +1208,7 @@ public class BlockProperties {
} }
/** /**
* Similar to collides(... , F_SOLID), but also checks the block above. * Similar to collides(... , F_GROUND), but also checks the block above (against spider).
* @param access * @param access
* @param minX * @param minX
* @param minY * @param minY