Skip to content

Commit de230ea

Browse files
committed
bug: Fixed shrapnel block damage
1 parent 310f3c2 commit de230ea

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
Fixes:
88
- Fixed various block entities' safe data and schematic requirements
9+
- Fixed shrapnel block damage
910

1011
## [5.9.1] - 2025-06-25
1112

src/main/java/rbasamoyai/createbigcannons/munitions/big_cannon/shrapnel/ShrapnelBurst.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import net.minecraft.server.level.ServerLevel;
1010
import net.minecraft.server.level.ServerPlayer;
1111
import net.minecraft.sounds.SoundSource;
12+
import net.minecraft.util.Mth;
1213
import net.minecraft.world.damagesource.DamageSource;
1314
import net.minecraft.world.entity.Entity;
1415
import net.minecraft.world.entity.EntityType;
@@ -67,7 +68,7 @@ protected void onSubProjectileHitBlock(BlockHitResult result, SubProjectile subP
6768
double curPom = this.getProperties().ballistics().durabilityMass() * curVel.length();
6869
double toughness = BlockArmorPropertiesHandler.getProperties(state).toughness(this.level(), state, pos, true);
6970
BlockPos pos1 = pos.immutable();
70-
CreateBigCannons.BLOCK_DAMAGE.damageBlock(pos1, (int) Math.min(curPom, toughness), state, this.level(), PartialBlockDamageManager::voidBlock);
71+
CreateBigCannons.BLOCK_DAMAGE.damageBlock(pos1, Mth.ceil(Math.min(curPom, toughness)), state, this.level(), PartialBlockDamageManager::voidBlock);
7172
}
7273
if (this.level() instanceof ServerLevel slevel) {
7374
ParticleOptions options = new BlockParticleOption(ParticleTypes.BLOCK, state);

0 commit comments

Comments
 (0)