Skip to content

Commit

Permalink
detect open water properly
Browse files Browse the repository at this point in the history
- the detection of open water should start at 2 blocks below, not 1.
- update mod version to 0.10.1-SNAPSHOT
  • Loading branch information
Wudji committed Dec 5, 2023
1 parent 1dcdee4 commit fff1d07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
org.gradle.jvmargs=-Xmx1G

# Mod Properties
mod_version = 0.10.0-SNAPSHOT
mod_version = 0.10.1-SNAPSHOT
maven_group = troy.autofish
archives_base_name = autofish

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/troy/autofish/Autofish.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ private void detectOpenWater(FishingBobberEntity bobber){
int y = bobber.getBlockY();
int z = bobber.getBlockZ();
boolean flag = true;
for(int yi = -1; yi <= 2; yi++){
for(int yi = -2; yi <= 2; yi++){
if(!(BlockPos.stream(x - 2, y + yi, z - 2, x + 2, y + yi, z + 2).allMatch((blockPos ->
// every block is water
bobber.getEntityWorld().getBlockState(blockPos).getBlock() == Blocks.WATER
Expand Down

0 comments on commit fff1d07

Please sign in to comment.