mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 07:17:58 +01:00
Fixed rocks and muffins not breaking glass when thrown. Closes #497
This commit is contained in:
parent
935cc95ea2
commit
e00bc4feca
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue