Puzzle 1.1.0 - Use IrisAPI, Deactivatable Integrations, Remove puzzle-blocks

- Use the new Iris API
- Builtin mod support is now configurable
- Puzzle button in Options screen can be disabled
- Remove puzzle-blocks (Already covered by Continuity)
- Fix #4
- Fix #5
- Fix #6
- Fix #7
This commit is contained in:
Motschen
2022-01-09 15:32:24 +01:00
parent 49ddb467ae
commit 88d6b4f5c3
20 changed files with 73 additions and 257 deletions

View File

@@ -2,6 +2,7 @@ package net.puzzlemc.gui.mixin;
import eu.midnightdust.lib.util.screen.TexturedOverlayButtonWidget;
import net.minecraft.util.Identifier;
import net.puzzlemc.core.config.PuzzleConfig;
import net.puzzlemc.gui.PuzzleClient;
import net.puzzlemc.gui.screen.PuzzleOptionsScreen;
import net.minecraft.client.gui.screen.Screen;
@@ -25,6 +26,7 @@ public abstract class MixinOptionsScreen extends Screen {
@Inject(at = @At("HEAD"), method = "init")
private void midnightlib$init(CallbackInfo ci) {
if (PuzzleConfig.enablePuzzleButton)
this.addDrawableChild(new TexturedOverlayButtonWidget(this.width / 2 - 178, this.height / 6 - 12, 20, 20, 0, 0, 20, PUZZLE_ICON_TEXTURE, 32, 64, (buttonWidget) -> (Objects.requireNonNull(this.client)).setScreen(new PuzzleOptionsScreen(this)), new TranslatableText("midnightlib.overview.title")));
}
}