Skip to content

Commit

Permalink
Fix mob spawners spawning mobs at world 0 0 0 (#563)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexdoru authored Dec 3, 2024
1 parent 7471a82 commit ec749ec
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
10 changes: 0 additions & 10 deletions src/main/java/codechicken/nei/asm/NEITransformer.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,6 @@ public NEITransformer() {
"func_149689_a",
"(Lnet/minecraft/world/World;IIILnet/minecraft/entity/EntityLivingBase;Lnet/minecraft/item/ItemStack;)V"),
asmblocks.get("spawnerPlaced")));

// Make MobSpawnerBaseLogic use getSpawnerWorld when creating new entities
transformer.add(
new MethodReplacer(
new ObfMapping(
"net/minecraft/tileentity/MobSpawnerBaseLogic",
"func_98281_h",
"()Lnet/minecraft/entity/Entity;"),
asmblocks.get("d_spawnerWorld"),
asmblocks.get("spawnerWorld")));
}

// Removes trailing seperators from NBTTagList/Compound.toString because OCD
Expand Down
7 changes: 0 additions & 7 deletions src/main/resources/assets/nei/asm/blocks.asm
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ ILOAD 4
PUTSTATIC codechicken/nei/ItemMobSpawner.placedZ:I
RETURN

list d_spawnerWorld
ACONST_NULL

list spawnerWorld
ALOAD 0
INVOKEVIRTUAL net/minecraft/tileentity/MobSpawnerBaseLogic.func_98271_a()Lnet/minecraft/world/World;

list n_commaFix
LDC *
INVOKEVIRTUAL java/lang/StringBuilder.append (Ljava/lang/String;)Ljava/lang/StringBuilder;
Expand Down

0 comments on commit ec749ec

Please sign in to comment.