Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit ac63d2a

Browse files
committed
Fix LocalCapture.PRINT that I forgot about
1 parent 0e1ba4c commit ac63d2a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

patchwork-loot/src/main/java/net/patchworkmc/mixin/loot/MixinLootPoolSerializer.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
import java.lang.reflect.Type;
2323

24+
import com.google.gson.JsonDeserializationContext;
25+
import com.google.gson.JsonElement;
2426
import org.spongepowered.asm.mixin.Mixin;
2527
import org.spongepowered.asm.mixin.injection.At;
2628
import org.spongepowered.asm.mixin.injection.Inject;
@@ -38,8 +40,8 @@
3840

3941
@Mixin(LootPool.Serializer.class)
4042
public class MixinLootPoolSerializer {
41-
@Inject(method = "deserialize", at = @At("RETURN"), cancellable = true, locals = LocalCapture.PRINT)
42-
private void addNameToConstructor(CallbackInfoReturnable<LootPool> cir, JsonObject obj) {
43+
@Inject(method = "deserialize", at = @At("RETURN"), cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD)
44+
private void addNameToConstructor(JsonElement elem, Type ty, JsonDeserializationContext ctx, CallbackInfoReturnable<LootPool> cir, JsonObject obj) {
4345
LootPool ret = cir.getReturnValue();
4446
((PatchworkLootPool) ret).patchwork$setName(LootHooks.readPoolName(obj));
4547

0 commit comments

Comments
 (0)