Skip to content

Commit

Permalink
fix: duplicating crop when using harvest with radius (closes #60)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamalam360 committed Mar 12, 2024
1 parent 103e15e commit 62580d0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Update to 1.20.4.
- Fix duplicating crop when using harvest with radius (#60)
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ private static InteractionResult onBlockUse(Player player, Level world, Interact
} else {
for (int x = -radius; x <= radius; x++) {
for (int z = -radius; z <= radius; z++) {
if (x == 0 && z == 0) {
continue;
}

BlockPos pos = hitResult.getBlockPos().relative(Direction.Axis.X, x)
.relative(Direction.Axis.Z, z);
if (circle && pos.distManhattan(hitResult.getBlockPos()) > radius) {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
org.gradle.parallel=true
version=4.1.3+1.20.4
version=4.1.4+1.20.4
minecraft_version=1.20.4
branch=main
group=io.github.jamalam360
Expand Down

0 comments on commit 62580d0

Please sign in to comment.