aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/dev/mayaqq/ygasi/mixin/AdvancementRewardsMixin.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/dev/mayaqq/ygasi/mixin/AdvancementRewardsMixin.java')
-rw-r--r--src/main/java/dev/mayaqq/ygasi/mixin/AdvancementRewardsMixin.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/dev/mayaqq/ygasi/mixin/AdvancementRewardsMixin.java b/src/main/java/dev/mayaqq/ygasi/mixin/AdvancementRewardsMixin.java
index 0f56908..a2c1330 100644
--- a/src/main/java/dev/mayaqq/ygasi/mixin/AdvancementRewardsMixin.java
+++ b/src/main/java/dev/mayaqq/ygasi/mixin/AdvancementRewardsMixin.java
@@ -1,7 +1,11 @@
package dev.mayaqq.ygasi.mixin;
import dev.mayaqq.ygasi.registry.ConfigRegistry;
+import net.minecraft.advancement.Advancement;
+import net.minecraft.advancement.AdvancementDisplay;
+import net.minecraft.advancement.AdvancementFrame;
import net.minecraft.advancement.AdvancementRewards;
+import net.minecraft.server.ServerAdvancementLoader;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.util.Identifier;
import org.spongepowered.asm.mixin.Final;
@@ -13,11 +17,12 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import static dev.mayaqq.ygasi.registry.StatRegistry.SKILL_POINTS;
+
@Mixin(AdvancementRewards.class)
public class AdvancementRewardsMixin {
@Shadow @Final private Identifier[] recipes;
- @Inject(method = "apply",at = @At("HEAD"))
+ @Inject(method = "apply", at = @At("HEAD"))
private void inject(ServerPlayerEntity player, CallbackInfo ci) {
if (recipes.length == 0) {
player.increaseStat(SKILL_POINTS, ConfigRegistry.CONFIG.pointsRewarded);