mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-05 20:59:09 +01:00
fixed the spread effect and chunk loader visualization not working below 0
This commit is contained in:
parent
e5b2f0f9c5
commit
bf757248d2
2 changed files with 3 additions and 3 deletions
|
@ -44,10 +44,10 @@ public class BlockChunkLoader extends BlockContainerImpl implements IVisualizabl
|
|||
if (range > 0) {
|
||||
return new AABB(
|
||||
pos.getX() - range >> 4 << 4,
|
||||
0,
|
||||
level.getMinBuildHeight(),
|
||||
pos.getZ() - range >> 4 << 4,
|
||||
(pos.getX() + range >> 4 << 4) + 16,
|
||||
level.getHeight(),
|
||||
level.getMaxBuildHeight(),
|
||||
(pos.getZ() + range >> 4 << 4) + 16);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ public class SpreadEffect implements IDrainSpotEffect {
|
|||
var bestAmount = drain ? Integer.MAX_VALUE : Integer.MIN_VALUE;
|
||||
for (var facing : Direction.values()) {
|
||||
var offset = pos.relative(facing, 15);
|
||||
if (level.isLoaded(offset) && offset.getY() >= 0 && offset.getY() <= level.getHeight()) {
|
||||
if (level.isLoaded(offset) && offset.getY() >= level.getMinBuildHeight() && offset.getY() <= level.getMaxBuildHeight()) {
|
||||
var amount = IAuraChunk.getAuraInArea(level, offset, 14);
|
||||
if (drain ? amount < bestAmount : amount > bestAmount) {
|
||||
bestAmount = amount;
|
||||
|
|
Loading…
Reference in a new issue