From 318af87a20c5301cbc0c2b8d1fc48d231f4468d4 Mon Sep 17 00:00:00 2001 From: Sebastian Hartte Date: Sun, 13 Oct 2024 18:57:00 +0200 Subject: [PATCH] Adapt signature finalizeMobSpawn in coremod to fix FinalizeSpawnEvent --- .../net/neoforged/neoforge/coremods/MethodRedirector.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coremods/src/main/java/net/neoforged/neoforge/coremods/MethodRedirector.java b/coremods/src/main/java/net/neoforged/neoforge/coremods/MethodRedirector.java index 8db3d7486d..d3bb0616c8 100644 --- a/coremods/src/main/java/net/neoforged/neoforge/coremods/MethodRedirector.java +++ b/coremods/src/main/java/net/neoforged/neoforge/coremods/MethodRedirector.java @@ -32,13 +32,13 @@ public class MethodRedirector implements ITransformer { new MethodRedirection( Opcodes.INVOKEVIRTUAL, "finalizeSpawn", - "(Lnet/minecraft/world/level/ServerLevelAccessor;Lnet/minecraft/world/DifficultyInstance;Lnet/minecraft/world/entity/MobSpawnType;Lnet/minecraft/world/entity/SpawnGroupData;)Lnet/minecraft/world/entity/SpawnGroupData;", + "(Lnet/minecraft/world/level/ServerLevelAccessor;Lnet/minecraft/world/DifficultyInstance;Lnet/minecraft/world/entity/EntitySpawnReason;Lnet/minecraft/world/entity/SpawnGroupData;)Lnet/minecraft/world/entity/SpawnGroupData;", "finalize_spawn_targets.json", methodInsnNode -> new MethodInsnNode( Opcodes.INVOKESTATIC, "net/neoforged/neoforge/event/EventHooks", "finalizeMobSpawn", - "(Lnet/minecraft/world/entity/Mob;Lnet/minecraft/world/level/ServerLevelAccessor;Lnet/minecraft/world/DifficultyInstance;Lnet/minecraft/world/entity/MobSpawnType;Lnet/minecraft/world/entity/SpawnGroupData;)Lnet/minecraft/world/entity/SpawnGroupData;", + "(Lnet/minecraft/world/entity/Mob;Lnet/minecraft/world/level/ServerLevelAccessor;Lnet/minecraft/world/DifficultyInstance;Lnet/minecraft/world/entity/EntitySpawnReason;Lnet/minecraft/world/entity/SpawnGroupData;)Lnet/minecraft/world/entity/SpawnGroupData;", false))); public MethodRedirector() {