stonecutter: setup project for multiversion support

- Switch to Stonecutter build system
- Migrate mappings to Mojmap
This commit is contained in:
Martin Prokoph
2025-11-19 16:05:34 +01:00
parent caee4c801a
commit b77bdc215e
87 changed files with 1104 additions and 1059 deletions

View File

@@ -0,0 +1,22 @@
package net.puzzlemc.gui.screen.widget;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.components.Button;
import net.minecraft.network.chat.Component;
import java.util.function.Supplier;
public class PuzzleButtonWidget extends Button {
private final PuzzleWidget.TextAction title;
public PuzzleButtonWidget(int x, int y, int width, int height, PuzzleWidget.TextAction title, OnPress onPress) {
super(x, y, width, height, Component.empty(), onPress, Supplier::get);
this.title = title;
}
@Override
public void renderWidget(GuiGraphics context, int mouseX, int mouseY, float delta) {
try { title.setTitle(this);
} catch (Exception e) {e.fillInStackTrace(); this.visible = false;}
super.renderWidget(context, mouseX, mouseY, delta);
}
}