From d345604f5f165fab4f9d391492ef9047270268b7 Mon Sep 17 00:00:00 2001
From: "yrsegal@gmail.com" <yrsegal@gmail.com>
Date: Mon, 12 Aug 2024 21:51:34 -0400
Subject: [PATCH] actually use the correct syntax for the injection

---
 .../integration/mixin/lootr/ConfigManagerMixin.java  | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/main/java/org/violetmoon/quark/integration/mixin/lootr/ConfigManagerMixin.java b/src/main/java/org/violetmoon/quark/integration/mixin/lootr/ConfigManagerMixin.java
index 012c93c52..8b213b92d 100644
--- a/src/main/java/org/violetmoon/quark/integration/mixin/lootr/ConfigManagerMixin.java
+++ b/src/main/java/org/violetmoon/quark/integration/mixin/lootr/ConfigManagerMixin.java
@@ -1,7 +1,6 @@
 package org.violetmoon.quark.integration.mixin.lootr;
 
-import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
-import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
+import com.llamalad7.mixinextras.injector.ModifyReturnValue;
 import net.minecraft.core.registries.BuiltInRegistries;
 import net.minecraft.resources.ResourceLocation;
 import net.minecraft.world.level.block.Block;
@@ -30,10 +29,9 @@ private static Block replacement(Block original, ResourceLocation location) {
 		return original;
 	}
 
-	@WrapOperation(method = "replacement", at = @At(value = "INVOKE", target = "Ljava/util/HashMap;<init>()V"), remap = false)
-	private static Map<Block, Block> addQuarkChests(Operation<Map<Block, Block>> original) {
-		Map<Block, Block> map = original.call();
-		Quark.LOOTR_INTEGRATION.populate(map);
-		return map;
+	@ModifyReturnValue(method = "replacement", at = @At(value = "NEW", target = "java/util/HashMap", remap = false), remap = false)
+	private static Map<Block, Block> addQuarkChests(Map<Block, Block> original) {
+		Quark.LOOTR_INTEGRATION.populate(original);
+		return original;
 	}
 }