Skip to content

Commit

Permalink
oops explosion was NOT fixed. now it is
Browse files Browse the repository at this point in the history
  • Loading branch information
CammiePone committed Jan 10, 2025
1 parent 2a0c00b commit 8d47bca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ else if(target.getType() == HitResult.Type.BLOCK) {
BlockHitResult blockHit = (BlockHitResult) target;
BlockPos pos = blockHit.getBlockPos().relative(blockHit.getDirection());

if(level.getBlockState(blockHit.getBlockPos()).getFluidState().is(Fluids.WATER))
level.setBlockAndUpdate(blockHit.getBlockPos(), Blocks.ICE.defaultBlockState());
else if(level.getBlockState(blockHit.getBlockPos()).getFluidState().is(Fluids.LAVA))
level.setBlockAndUpdate(blockHit.getBlockPos(), Blocks.OBSIDIAN.defaultBlockState());
if(level.getBlockState(pos).getFluidState().is(Fluids.WATER))
level.setBlockAndUpdate(pos, Blocks.ICE.defaultBlockState());
else if(level.getBlockState(pos).getFluidState().is(Fluids.LAVA))
level.setBlockAndUpdate(pos, Blocks.OBSIDIAN.defaultBlockState());
else if(level.loadedAndEntityCanStandOn(pos.below(), caster) && level.isUnobstructed(Blocks.SNOW.defaultBlockState(), pos, CollisionContext.empty()) && level.getBlockState(pos).canBeReplaced())
level.setBlockAndUpdate(pos, Blocks.SNOW.defaultBlockState());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void cast(@Nullable LivingEntity caster, Vec3 castFrom, @Nullable Entity
if(!world.isInWorldBounds(blockPos))
break;

if(!blockState.isAir())
if(!blockState.isAir() && blockState.getFluidState().isEmpty())
h -= (blockState.getBlock().getExplosionResistance() + 0.3F) * 0.3F;

if(!world.isEmptyBlock(blockPos))
Expand Down

0 comments on commit 8d47bca

Please sign in to comment.