aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java
index d7c84a6f..c8c7a3da 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java
@@ -481,7 +481,7 @@ public class CustomItemEffects {
event.partialTicks,
candidatesOld,
candidatesOldSorted,
- 199 - MAX_BUILDERS_BLOCKS
+ 499 - MAX_BUILDERS_BLOCKS
);
boolean usingDirtWand = false;
@@ -1136,8 +1136,10 @@ public class CustomItemEffects {
for (int xOff = -radius; xOff <= radius; xOff++) {
for (int zOff = -radius; zOff <= radius; zOff++) {
BlockPos renderPos = target.add(xOff, 0, zOff);
+ BlockPos airPos = renderPos.add(0, 1, 0);
IBlockState renderState = Minecraft.getMinecraft().theWorld.getBlockState(renderPos);
- if (renderState.getBlock() == Blocks.dirt || renderState.getBlock() == Blocks.grass) {
+ IBlockState airState = Minecraft.getMinecraft().theWorld.getBlockState(airPos);
+ if (renderState.getBlock() == Blocks.dirt || renderState.getBlock() == Blocks.grass && airState.getBlock() == Blocks.air) {
AxisAlignedBB bbExpanded = Blocks.dirt.getSelectedBoundingBox(
Minecraft.getMinecraft().theWorld,
renderPos
@@ -1190,10 +1192,12 @@ public class CustomItemEffects {
int zOff = facing == Facing.NORTH ? -1 : facing == Facing.SOUTH ? 1 : 0;
BlockPos renderPos = candidate.add(xOff, 0, zOff);
+ BlockPos airPos = renderPos.add(0, 1, 0);
IBlockState renderState = Minecraft.getMinecraft().theWorld.getBlockState(renderPos);
+ IBlockState airState = Minecraft.getMinecraft().theWorld.getBlockState(airPos);
if (!candidatesOld.contains(renderPos) && !candidates.contains(renderPos) && !candidatesNew.contains(
renderPos)) {
- if (renderState.getBlock() == Blocks.dirt || renderState.getBlock() == Blocks.grass) {
+ if (renderState.getBlock() == Blocks.dirt || renderState.getBlock() == Blocks.grass && airState.getBlock() == Blocks.air) {
candidatesNew.add(renderPos);
} else {
break;