diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinNotEnoughUpdates.java | 21 | ||||
-rw-r--r-- | src/main/resources/mixins.skyhanni.json | 1 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinNotEnoughUpdates.java b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinNotEnoughUpdates.java new file mode 100644 index 000000000..3b4378e52 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinNotEnoughUpdates.java @@ -0,0 +1,21 @@ +package at.hannibal2.skyhanni.mixins.transformers; + +import at.hannibal2.skyhanni.utils.LorenzUtils; +import io.github.moulberry.notenoughupdates.NotEnoughUpdates; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +@Mixin(value = NotEnoughUpdates.class, remap = false) +public class MixinNotEnoughUpdates { + + @Shadow + private boolean hasSkyblockScoreboard; + + @Inject(method = "updateSkyblockScoreboard", at = @At(value = "TAIL")) + private void onLivingUpdate(CallbackInfo ci) { + hasSkyblockScoreboard = LorenzUtils.INSTANCE.getInSkyBlock(); + } +} diff --git a/src/main/resources/mixins.skyhanni.json b/src/main/resources/mixins.skyhanni.json index a05c6837d..c8d14cd14 100644 --- a/src/main/resources/mixins.skyhanni.json +++ b/src/main/resources/mixins.skyhanni.json @@ -9,6 +9,7 @@ "MixinEntityFireball", "MixinNetHandlerPlayClient", "MixinNetworkManager", + "MixinNotEnoughUpdates", "MixinRenderItem", "MixinRenderManager", "gui.AccessorGuiContainer", |