mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-09-18 09:51:17 +02:00
Workaround for standing on the block below a cactus (simplistic).
This commit is contained in:
parent
0fff534cd1
commit
cbe0b5c0d7
@ -1415,9 +1415,9 @@ public class BlockProperties {
|
||||
// TODO: further exclude simple full shape blocks, or confine to itchy block types
|
||||
// TODO: make flags for it.
|
||||
// Simplistic hot fix attempt for same type + same shape.
|
||||
double[] bounds = access.getBounds(x, y, z);
|
||||
final double[] bounds = access.getBounds(x, y, z);
|
||||
if (bounds == null) return true;
|
||||
double[] aboveBounds = access.getBounds(x, y + 1, z);
|
||||
final double[] aboveBounds = access.getBounds(x, y + 1, z);
|
||||
if (aboveBounds == null) return true;
|
||||
boolean fullBounds = false;
|
||||
for (int i = 0; i < 3; i++){
|
||||
@ -1438,6 +1438,12 @@ public class BlockProperties {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Workarounds.
|
||||
if (aboveId == Material.CACTUS.getId() && aboveId != id){
|
||||
// TODO: This is a rough estimate, assumes sand underneath, further relies on passable.
|
||||
// TODO: General workaround for slightly inset blocks which have full bounds for passable.
|
||||
return true;
|
||||
}
|
||||
// Not regarded as ground.
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user