Skip to content

Commit

Permalink
actually use the correct syntax for the injection
Browse files Browse the repository at this point in the history
  • Loading branch information
yrsegal committed Aug 13, 2024
1 parent 747c12c commit d345604
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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;
}
}

0 comments on commit d345604

Please sign in to comment.