cherry pick
fix: fixed thrown items breaking blocks they shouldn't be able to break
@@ -194,9 +194,10 @@ public class ThrownModularItemEntity extends AbstractArrow implements IEntityAdd
ItemModularHandheld item = CastOptional.cast(thrownStack.getItem(), ItemModularHandheld.class).orElse(null);
if (ToolActionHelper.isEffectiveOn(thrownStack, blockState) && shooter instanceof Player player && item != null) {
- double destroySpeed = item.getDestroySpeed(thrownStack, blockState) * item.getEffectEfficiency(thrownStack, ItemEffect.throwable);
+ double destroySpeed = item.getDestroySpeed(thrownStack, blockState);
- if (destroySpeed > blockState.getDestroySpeed(level, pos)) {
+ if (destroySpeed > 1
+ && destroySpeed * item.getEffectEfficiency(thrownStack, ItemEffect.throwable) > blockState.getDestroySpeed(level, pos)) {
if (shooter instanceof ServerPlayer serverPlayer) {
EffectHelper.sendEventToPlayer(serverPlayer, 2001, pos, Block.getId(blockState));
}
