aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorNopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>2023-03-12 09:01:53 +1100
committerGitHub <noreply@github.com>2023-03-11 23:01:53 +0100
commit1f8cc3427a7539b43b2d7f8ebd3ce81a6d77aa94 (patch)
tree196bb7eea533b936dad61e763412e837ac62b34a /src/main
parenteddab2781ace248731273b9f249f12ff28734955 (diff)
downloadNotEnoughUpdates-1f8cc3427a7539b43b2d7f8ebd3ce81a6d77aa94.tar.gz
NotEnoughUpdates-1f8cc3427a7539b43b2d7f8ebd3ce81a6d77aa94.tar.bz2
NotEnoughUpdates-1f8cc3427a7539b43b2d7f8ebd3ce81a6d77aa94.zip
Fixed builders ruler limit at 200 and tilling hoes showing blocks it wont till (#635)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main')
-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;