PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

54M Downloads

Mobs spawned by Pressurized Spawners has `pneumaticcraft:defender` tag

shBLOCK opened this issue ยท 1 comments

commented

Describe the bug

From various sources, it seems like this (Pressurized Spawner mobs getting tagged as pneumaticcraft:defender and thus can't be used for vacuum traps) isn't supposed to happen.

Related code:

@SubscribeEvent(priority = EventPriority.LOWEST)
public void onMobSpawn(FinalizeSpawnEvent event) {
if (event.getSpawner() != null) {
// tag any mob spawned by a vanilla Spawner (rather than naturally) as a "defender"
// such defenders are immune to being absorbed by a Vacuum Trap
// note: mobs spawned by a Pressurized Spawner are not considered to be defenders
event.getEntity().addTag(VacuumTrapBlockEntity.DEFENDER_TAG);

Which Minecraft version are you using?

1.21

commented

Yeah, that broke in 1.21 when the spawner event changed from a nullable field to an Either<BlockEntity, Entity> field (support for spawner minecarts). Will be fixed in next release. Thanks for catching it.