remove unnecessary sentry block removal
@@ -204,13 +204,6 @@ public class Sentry extends PathfinderMob implements RangedAttackMob { //needs t
}
}
else if (item == SCContent.UNIVERSAL_BLOCK_MODIFIER.get()) {
- if (!getDisguiseModule().isEmpty()) {
- Block block = ((ModuleItem) getDisguiseModule().getItem()).getBlockAddon(getDisguiseModule().getTag());
-
- if (block == level.getBlockState(pos).getBlock())
- level.setBlockAndUpdate(pos, Blocks.AIR.defaultBlockState());
- }
-
Block.popResource(level, pos, getDisguiseModule());
Block.popResource(level, pos, getAllowlistModule());
@@ -259,7 +252,7 @@ public class Sentry extends PathfinderMob implements RangedAttackMob { //needs t
Block.popResource(level, pos, new ItemStack(SCContent.SENTRY.get()));
Block.popResource(level, pos, getDisguiseModule()); //if there is none, nothing will drop
Block.popResource(level, pos, getAllowlistModule()); //if there is none, nothing will drop
- level.setBlockAndUpdate(blockPosition(), Blocks.AIR.defaultBlockState());
+ level.setBlockAndUpdate(pos, Blocks.AIR.defaultBlockState());
if (hasSpeedModule())
Block.popResource(level, pos, new ItemStack(SCContent.SPEED_MODULE.get()));
