Alex's Caves

Alex's Caves

11M Downloads

Please stick to one way of destroying blocks

JrDemiurg opened this issue ยท 2 comments

commented

In TremorzillaEntity.java breakBlocksInBoundingBox()

if (random.nextFloat() <= dropChance) {
                    level().destroyBlock(blockpos, true);
                } else {
                    level().setBlockAndUpdate(blockpos, Blocks.AIR.defaultBlockState());
                }

You're using 2 different methods to destroy blocks at the same time.

To avoid dropping it would be enough to call the level().destroyBlock(blockpos, false) method instead of replacing the block with air.

It's not a bug, but when I make a mixin to destroy blocks and use several different methods at the same time, it's inconvenient.

Thanks for your time <3

commented

Also in breakBlocksAround() the same thing

if (random.nextFloat() <= dropChance && !nuke) {
                    level().destroyBlock(blockpos, true);
                } else {
                    blockstate.onBlockExploded(level(), blockpos, dummyExplosion);
                }

but there's another new method being used here for some reason...

commented

Maybe this was done for optimization purposes, since other methods create less load?