mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-09 12:10:37 +01:00
Account for 1.5 block high blocks in collidesId and collidesBlock.
This commit is contained in:
parent
6ee59c858a
commit
655c620cb6
@ -1127,7 +1127,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);
|
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);
|
||||||
@ -1158,7 +1158,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);
|
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);
|
||||||
|
Loading…
Reference in New Issue
Block a user