Closed Insane96 closed 1 year ago
Minecraft Version: 1.20.1
NeoForge Version: 47.1.56
Logs: Not really needed
Steps to Reproduce:
Example code This makes Phantoms spawn in The End instead of the Overworld
@SubscribeEvent public void onPhantomsSpawn(PlayerSpawnPhantomsEvent event) { if (event.getEntity().level().dimension() == Level.OVERWORLD) event.setResult(Event.Result.DENY); else if (event.getEntity().level().dimension() == Level.END) event.setResult(Event.Result.ALLOW); }
Description of issue: This happens because the event is never posted, only instantiated: https://github.com/neoforged/NeoForge/blob/3323a2f37989bea3171273292f5a355ef445a9f3/patches/minecraft/net/minecraft/world/level/levelgen/PhantomSpawner.java.patch#L10
Looks like an undiscovered issue with the upstream PR MinecraftForge/MinecraftForge#9644 at the time it was merged, and we didn't discover it during our pulling of uncontested changes from upstream.
Minecraft Version: 1.20.1
NeoForge Version: 47.1.56
Logs: Not really needed
Steps to Reproduce:
Example code This makes Phantoms spawn in The End instead of the Overworld
Description of issue: This happens because the event is never posted, only instantiated: https://github.com/neoforged/NeoForge/blob/3323a2f37989bea3171273292f5a355ef445a9f3/patches/minecraft/net/minecraft/world/level/levelgen/PhantomSpawner.java.patch#L10