From 8fffa45eeb32bd68cd5a41ba9ac035f27d92d234 Mon Sep 17 00:00:00 2001 From: James Green Date: Mon, 22 Jul 2024 16:08:28 -0700 Subject: [PATCH] fix ship bottle placeable on water --- src/main/java/g_mungus/ship_in_a_bottle/item/BottleWithShip.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/g_mungus/ship_in_a_bottle/item/BottleWithShip.java b/src/main/java/g_mungus/ship_in_a_bottle/item/BottleWithShip.java index 39e7628..3704175 100644 --- a/src/main/java/g_mungus/ship_in_a_bottle/item/BottleWithShip.java +++ b/src/main/java/g_mungus/ship_in_a_bottle/item/BottleWithShip.java @@ -72,6 +72,7 @@ public TypedActionResult 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 {