Skip to content

Commit

Permalink
fix ship bottle placeable on water
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgreen26 committed Jul 22, 2024
1 parent 5d38503 commit 8fffa45
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public TypedActionResult<ItemStack> use(World world, PlayerEntity user, Hand han
return TypedActionResult.pass(itemStack);
} else if (!world.getBlockState(blockHitResult.getBlockPos()).isOf(Blocks.WATER) || user.isSneaking()) {
BlockHitResult blockHitResult2 = raycast(world, user, RaycastContext.FluidHandling.NONE);
if (blockHitResult2.getType() != HitResult.Type.BLOCK) return TypedActionResult.pass(itemStack);
super.place(new ItemPlacementContext(user, hand, itemStack,blockHitResult2));
return TypedActionResult.success(itemStack);
} else {
Expand Down

0 comments on commit 8fffa45

Please sign in to comment.