From e00bc4fecaeced40a5e6c9a7c4ffd5fbac863165 Mon Sep 17 00:00:00 2001 From: Sollace Date: Tue, 29 Oct 2024 16:22:01 +0000 Subject: [PATCH] Fixed rocks and muffins not breaking glass when thrown. Closes #497 --- .../unicopia/projectile/PhysicsBodyProjectileEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/minelittlepony/unicopia/projectile/PhysicsBodyProjectileEntity.java b/src/main/java/com/minelittlepony/unicopia/projectile/PhysicsBodyProjectileEntity.java index 8eab023a..38ef6e5e 100644 --- a/src/main/java/com/minelittlepony/unicopia/projectile/PhysicsBodyProjectileEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/projectile/PhysicsBodyProjectileEntity.java @@ -226,7 +226,7 @@ public class PhysicsBodyProjectileEntity extends PersistentProjectileEntity impl boolean ownerCanModify = !getWorld().isClient && Caster.of(getOwner()).filter(pony -> pony.canModifyAt(hit.getBlockPos())).isPresent(); if (ownerCanModify && getWorld().getGameRules().getBoolean(GameRules.DO_MOB_GRIEFING)) { - if ((!isBouncy() || getWorld().random.nextInt(200) == 0) && state.isIn(UTags.Blocks.FRAGILE)) { + if ((!isBouncy() || getWorld().random.nextInt(200) == 0) && getWorld().getBlockState(hit.getBlockPos()).isIn(UTags.Blocks.FRAGILE)) { getWorld().breakBlock(hit.getBlockPos(), true); } }