Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ repositories {
}

dependencies {
compileOnly("net.minestom:minestom:2025.07.04-1.21.5")
testImplementation("net.minestom:minestom:2025.07.04-1.21.5")
compileOnly("net.minestom:minestom:2025.08.29-1.21.8")
testImplementation("net.minestom:minestom:2025.08.29-1.21.8")
}

tasks.withType<JavaCompile> {
Expand All @@ -30,4 +30,4 @@ publishing {
from(components["java"])
}
}
}
}
2 changes: 1 addition & 1 deletion src/main/java/io/github/togar2/fluids/FlowableFluid.java
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ protected void flow(Instance instance, BlockVec point, FluidState newState, Bloc
}
}

instance.placeBlock(new BlockHandler.Placement(newState.block(), instance, point));
instance.placeBlock(new BlockHandler.Placement(newState.block(), currentBlock,instance, point));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/github/togar2/fluids/WaterlogHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ default boolean placeFluid(Instance instance, BlockVec point, FluidState state)

// The placed state (waterlogged block) is different from the original fluid state (probably just water)
FluidState placedState = FluidState.of(currentBlock).setWaterlogged(true);
instance.placeBlock(new BlockHandler.Placement(placedState.block(), instance, point));
instance.placeBlock(new BlockHandler.Placement(placedState.block(), currentBlock,instance, point));
MinestomFluids.scheduleTick(instance, point, placedState);
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/io/github/togar2/fluids/test/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static void main(String[] args) {
handler.placeFluid(instance, event.getBlockPosition(), MinestomFluids.WATER.getDefaultState());
} else {
event.getInstance().placeBlock(new BlockHandler.Placement(
Block.WATER, event.getInstance(), event.getBlockPosition().relative(event.getBlockFace())));
Block.WATER, event.getBlock(), event.getInstance(), event.getBlockPosition().relative(event.getBlockFace())));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am pretty sure event.getBlock() does not return the right block. You should take the current block at the placement position (this returns the block at the interaction position)

}
} else if (event.getPlayer().getItemInHand(event.getHand()).material() == Material.BUCKET) {
WaterlogHandler handler = MinestomFluids.getWaterlog(event.getBlock());
Expand All @@ -55,7 +55,7 @@ public static void main(String[] args) {
}
} else if (event.getPlayer().getItemInHand(event.getHand()).material() == Material.LAVA_BUCKET) {
event.getInstance().placeBlock(new BlockHandler.Placement(
Block.LAVA, event.getInstance(), event.getBlockPosition().relative(event.getBlockFace())));
Block.LAVA, event.getBlock(), event.getInstance(), event.getBlockPosition().relative(event.getBlockFace())));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same applies here

}
});

Expand Down