Skip to content

Commit 12015d6

Browse files
committed
Puzzle 1.4.2 - Update to 1.19.3
Here's a little Christmas present for y'all! Puzzle now has 1.19.3 support.
1 parent a8c89b1 commit 12015d6

12 files changed

Lines changed: 52 additions & 48 deletions

File tree

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,18 @@ dependencies {
122122
}
123123
modImplementation ("maven.modrinth:cull-leaves:${project.cull_leaves_version}")
124124
modImplementation ("maven.modrinth:lambdynamiclights:${project.ldl_version}")
125-
modImplementation ("maven.modrinth:lambdabettergrass:${project.lbg_version}")
125+
modCompileOnlyApi ("maven.modrinth:lambdabettergrass:${project.lbg_version}")
126126
modImplementation ("maven.modrinth:iris:${project.iris_version}")
127127
modCompileOnly ("maven.modrinth:cit-resewn:${project.cit_resewn_version}")
128-
modImplementation ("maven.modrinth:continuity:${project.continuity_version}")
128+
modCompileOnlyApi ("maven.modrinth:continuity:${project.continuity_version}")
129129
modImplementation ("maven.modrinth:animatica:${project.animatica_version}")
130-
modImplementation ("maven.modrinth:colormatic:${project.colormatic_version}")
130+
modCompileOnlyApi ("maven.modrinth:colormatic:${project.colormatic_version}")
131131
modImplementation ("maven.modrinth:borderless-mining:${project.borderless_mining_version}")
132132
modImplementation ("maven.modrinth:dynamic-fps:${project.dynamic_fps_version}")
133133
modImplementation("com.moandjiezana.toml:toml4j:${project.toml4j_version}")
134134
modImplementation ("maven.modrinth:entitytexturefeatures:${project.entitytexturefeatures_version}")
135135
modImplementation ("maven.modrinth:cem:${project.cem_version}")
136-
modImplementation "com.gitlab.Lortseam:completeconfig:${project.complete_config_version}"
136+
modImplementation "com.github.Lortseam.completeconfig:base:${project.complete_config_version}"
137137

138138
modImplementation("org.aperlambda:lambdajcommon:1.8.1") {
139139
exclude group: 'com.google.code.gson'

gradle.properties

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,33 @@ org.gradle.jvmargs=-Xmx4G
33

44
# Fabric Properties
55
# check these on https://fabricmc.net/use
6-
minecraft_version=1.19
7-
yarn_mappings=1.19+build.4
8-
loader_version=0.14.8
6+
minecraft_version=1.19.3
7+
yarn_mappings=1.19.3+build.5
8+
loader_version=0.14.12
99

1010
# Mod Properties
11-
mod_version = 1.4.0-1.19
11+
mod_version = 1.4.2-1.19.3
1212
maven_group = net.puzzlemc
1313
archives_base_name = puzzle
1414

1515
# Dependencies
1616
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
17-
fabric_version=0.57.0+1.19
18-
mod_menu_version = 4.0.0
17+
fabric_version=0.70.0+1.19.3
18+
mod_menu_version = 5.0.2
1919

20-
cull_leaves_version = 2.3.3
21-
ldl_version = 2.1.2+1.19
20+
cull_leaves_version = 3.0.2-fabric
21+
ldl_version = 2.2.0+1.19.3
2222
lbg_version = 1.3.0+1.19
23-
iris_version = 1.19.x-v1.2.5
23+
iris_version = 1.19.3-v1.4.6
2424
continuity_version = 2.0.0+1.19
2525
animatica_version = 0.5+1.19
2626
colormatic_version = 3.1.2
27-
borderless_mining_version = 1.1.5+1.19
27+
borderless_mining_version = 1.1.6+1.19.3
2828
dynamic_fps_version = 2.2.0
2929
toml4j_version = 0.7.2
3030
cit_resewn_version = 1.1.1+1.19
31-
cem_version = 0.7.1-1.19
32-
complete_config_version = 1.0.0
33-
spruceui_version=4.0.0+1.19
34-
midnightlib_version=0.5.2
35-
entitytexturefeatures_version=4.0.1.fabric
31+
cem_version = 0.7.1-1.19.3
32+
complete_config_version = 2.2.0
33+
spruceui_version=4.1.0+1.19.3
34+
midnightlib_version=1.1.0-fabric
35+
entitytexturefeatures_version=4.2.0.1.fabric.1.19.3

puzzle-base/src/main/java/net/puzzlemc/core/mixin/MixinTitleScreen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private void confirmLink(boolean open) {
6868
private void puzzle$mouseClicked(double mouseX, double mouseY, int button, CallbackInfoReturnable<Boolean> cir) {
6969
if (mouseX > 2 && mouseX < (double)(2 + this.puzzleTextWidth) && mouseY > (double)(this.height - yOffset) && mouseY < (double)this.height - yOffset + 10) {
7070
if (Objects.requireNonNull(this.client).options.getChatLinksPrompt().getValue()) {
71-
this.client.setScreen(new ConfirmChatLinkScreen(this::confirmLink, PuzzleCore.updateURL, true));
71+
this.client.setScreen(new ConfirmLinkScreen(this::confirmLink, PuzzleCore.updateURL, true));
7272
} else {
7373
Util.getOperatingSystem().open(PuzzleCore.updateURL);
7474
}

puzzle-gui/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,21 @@ dependencies {
3939
modImplementation ("com.terraformersmc:modmenu:${project.mod_menu_version}")
4040
modImplementation ("maven.modrinth:cull-leaves:${project.cull_leaves_version}")
4141
modImplementation ("maven.modrinth:lambdynamiclights:${project.ldl_version}")
42-
modImplementation ("maven.modrinth:lambdabettergrass:${project.lbg_version}")
42+
modCompileOnlyApi ("maven.modrinth:lambdabettergrass:${project.lbg_version}")
4343
modImplementation ("maven.modrinth:iris:${project.iris_version}")
4444
modImplementation ("maven.modrinth:cit-resewn:${project.cit_resewn_version}")
45-
modImplementation ("maven.modrinth:colormatic:${project.colormatic_version}")
45+
modCompileOnlyApi ("maven.modrinth:colormatic:${project.colormatic_version}")
4646
modImplementation ("maven.modrinth:borderless-mining:${project.borderless_mining_version}")
4747
modImplementation ("maven.modrinth:dynamic-fps:${project.dynamic_fps_version}")
4848
modImplementation ("maven.modrinth:entitytexturefeatures:${project.entitytexturefeatures_version}")
4949
modImplementation ("maven.modrinth:cem:${project.cem_version}")
50-
modImplementation "com.gitlab.Lortseam:completeconfig:${project.complete_config_version}"
50+
modImplementation "com.github.Lortseam.completeconfig:base:${project.complete_config_version}"
5151

5252
modImplementation("org.aperlambda:lambdajcommon:1.8.1") {
5353
exclude group: 'com.google.code.gson'
5454
exclude group: 'com.google.guava'
5555
}
56-
modImplementation ("maven.modrinth:continuity:${project.continuity_version}") {
56+
modCompileOnlyApi ("maven.modrinth:continuity:${project.continuity_version}") {
5757
exclude module: "modmenu"
5858
}
5959
}

puzzle-gui/src/main/java/net/puzzlemc/gui/PuzzleClient.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import traben.entity_texture_features.ETFApi;
3030
import traben.entity_texture_features.config.ETFConfig;
3131
import io.github.kvverti.colormatic.ColormaticConfig;
32+
import traben.entity_texture_features.texture_handlers.ETFManager;
3233

3334
public class PuzzleClient implements ClientModInitializer {
3435

@@ -265,9 +266,9 @@ public static void lateInit() { // Some mods are initialized after Puzzle, so we
265266
etfConfig.enableEmissiveTextures = !etfConfig.enableEmissiveTextures;
266267
ETFApi.saveETFConfigChangesAndResetETF();
267268
}));
268-
PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.translatable("config.entity_texture_features.full_bright_emissives.title"), (button) -> button.setMessage(
269-
etfConfig.fullBrightEmissives ? Text.translatable("entity_texture_features.puzzle.emissive_type.brighter") : Text.translatable("entity_texture_features.puzzle.emissive_type.default")), (button) -> {
270-
etfConfig.fullBrightEmissives = !etfConfig.fullBrightEmissives ;
269+
PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.translatable("config.entity_texture_features.emissive_mode.title"), (button) -> button.setMessage(
270+
Text.literal(etfConfig.emissiveRenderMode.toString())), (button) -> {
271+
etfConfig.emissiveRenderMode = etfConfig.emissiveRenderMode.next();
271272
ETFApi.saveETFConfigChangesAndResetETF();
272273
}));
273274
PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.translatable("config.entity_texture_features.blinking_mob_settings.title"), (button) -> button.setMessage(etfConfig.enableBlinking ? YES : NO), (button) -> {

puzzle-gui/src/main/java/net/puzzlemc/gui/screen/PuzzleOptionsScreen.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ protected void init() {
3131
PerformancePage performancePage = new PerformancePage(this);
3232
ResourcesPage resourcesPage = new ResourcesPage(this);
3333

34-
if (!PuzzleApi.GRAPHICS_OPTIONS.isEmpty()) this.addDrawableChild(new ButtonWidget(this.width / 2 - 155, this.height / 6 + 48 - 6, 150, 20, graphicsPage.getTitle().copy().append("..."), (button) -> Objects.requireNonNull(client).setScreen(graphicsPage)));
35-
if (!PuzzleApi.RESOURCE_OPTIONS.isEmpty()) this.addDrawableChild(new ButtonWidget(this.width / 2 + 5, this.height / 6 + 48 - 6, 150, 20, resourcesPage.getTitle().copy().append("..."), (button) -> Objects.requireNonNull(client).setScreen(resourcesPage)));
36-
if (!PuzzleApi.PERFORMANCE_OPTIONS.isEmpty()) this.addDrawableChild(new ButtonWidget(this.width / 2 - 155, this.height / 6 + 72 - 6, 150, 20, performancePage.getTitle().copy().append("..."), (button) -> Objects.requireNonNull(client).setScreen(performancePage)));
37-
if (!PuzzleApi.MISC_OPTIONS.isEmpty()) this.addDrawableChild(new ButtonWidget(this.width / 2 + 5, this.height / 6 + 72 - 6, 150, 20, miscPage.getTitle().copy().append("..."), (button) -> Objects.requireNonNull(client).setScreen(miscPage)));
38-
this.addDrawableChild(new ButtonWidget(this.width / 2 - 100, this.height / 6 + 168, 200, 20, ScreenTexts.DONE, (button) -> Objects.requireNonNull(client).setScreen(parent)));
34+
if (!PuzzleApi.GRAPHICS_OPTIONS.isEmpty()) this.addDrawableChild(ButtonWidget.builder(graphicsPage.getTitle().copy().append("..."), (button) -> Objects.requireNonNull(client).setScreen(graphicsPage)).dimensions(this.width / 2 - 155, this.height / 6 + 48 - 6, 150, 20).build());
35+
if (!PuzzleApi.RESOURCE_OPTIONS.isEmpty()) this.addDrawableChild(ButtonWidget.builder(resourcesPage.getTitle().copy().append("..."), (button) -> Objects.requireNonNull(client).setScreen(resourcesPage)).dimensions(this.width / 2 + 5, this.height / 6 + 48 - 6, 150, 20).build());
36+
if (!PuzzleApi.PERFORMANCE_OPTIONS.isEmpty()) this.addDrawableChild(ButtonWidget.builder(performancePage.getTitle().copy().append("..."), (button) -> Objects.requireNonNull(client).setScreen(performancePage)).dimensions(this.width / 2 - 155, this.height / 6 + 72 - 6, 150, 20).build());
37+
if (!PuzzleApi.MISC_OPTIONS.isEmpty()) this.addDrawableChild(ButtonWidget.builder(miscPage.getTitle().copy().append("..."), (button) -> Objects.requireNonNull(client).setScreen(miscPage)).dimensions(this.width / 2 + 5, this.height / 6 + 72 - 6, 150, 20).build());
38+
this.addDrawableChild(ButtonWidget.builder(ScreenTexts.DONE, (button) -> Objects.requireNonNull(client).setScreen(parent)).dimensions(this.width / 2 - 100, this.height / 6 + 168, 200, 20).build());
3939
}
4040

4141
@Override

puzzle-gui/src/main/java/net/puzzlemc/gui/screen/page/AbstractPuzzleOptionsPage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ protected void init() {
3131

3232
super.init();
3333

34-
this.addDrawableChild(new ButtonWidget(this.width / 2 - 100, this.height - 28, 200, 20, ScreenTexts.DONE, (button) -> Objects.requireNonNull(client).setScreen(parent)));
34+
this.addDrawableChild(ButtonWidget.builder(ScreenTexts.DONE, (button) -> Objects.requireNonNull(client).setScreen(parent)).dimensions(this.width / 2 - 100, this.height - 28, 200, 20).build());
3535
}
3636

3737
@Override

puzzle-gui/src/main/java/net/puzzlemc/gui/screen/widget/PuzzleButtonWidget.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
import net.minecraft.client.util.math.MatrixStack;
55
import net.minecraft.text.Text;
66

7+
import java.util.function.Supplier;
8+
79
public class PuzzleButtonWidget extends ButtonWidget {
810
private final PuzzleWidget.TextAction title;
911

1012
public PuzzleButtonWidget(int x, int y, int width, int height, PuzzleWidget.TextAction title, PressAction onPress) {
11-
super(x, y, width, height, Text.of(""), onPress);
13+
super(x, y, width, height, Text.of(""), onPress, Supplier::get);
1214
this.title = title;
1315
}
1416
@Override

puzzle-gui/src/main/java/net/puzzlemc/gui/screen/widget/PuzzleOptionListWidget.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public static ButtonEntry create(ClickableWidget button, Text text) {
7979

8080
public void render(MatrixStack matrices, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta) {
8181
if (button != null) {
82-
button.y = y;
82+
button.setY(y);
8383
button.render(matrices, mouseX, mouseY, tickDelta);
8484
}
8585
if (button == null) drawCenteredText(matrices,textRenderer, Text.literal("------ ").append(text).append(" ------"),x + 200,y+5,0xFFFFFF);
@@ -105,10 +105,10 @@ public void render(MatrixStack matrices, int index, int y, int x, int entryWidth
105105
}
106106
}
107107
public int getY() {
108-
return button.y;
108+
return button.getY();
109109
}
110110
public int getX() {
111-
return button.x;
111+
return button.getX();
112112
}
113113
public int getHeight() {
114114
return button.getHeight();

puzzle-models/src/main/java/net/puzzlemc/models/mixin/MixinModelElementDeserializer.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import com.google.gson.JsonParseException;
55
import net.minecraft.client.render.model.json.ModelElement;
66
import net.minecraft.util.JsonHelper;
7-
import net.minecraft.util.math.Vec3f;
87
import net.puzzlemc.core.config.PuzzleConfig;
8+
import org.joml.Vector3f;
99
import org.spongepowered.asm.mixin.Mixin;
1010
import org.spongepowered.asm.mixin.Shadow;
1111
import org.spongepowered.asm.mixin.injection.At;
@@ -14,7 +14,7 @@
1414

1515
@Mixin(ModelElement.Deserializer.class)
1616
public abstract class MixinModelElementDeserializer {
17-
@Shadow protected abstract Vec3f deserializeVec3f(JsonObject object, String name);
17+
@Shadow protected abstract Vector3f deserializeVec3f(JsonObject object, String name);
1818

1919
@Inject(at = @At("HEAD"),method = "deserializeRotationAngle", cancellable = true)
2020
private void puzzle$deserializeRotationAngle(JsonObject object, CallbackInfoReturnable<Float> cir) {
@@ -24,21 +24,21 @@ public abstract class MixinModelElementDeserializer {
2424
}
2525
}
2626
@Inject(at = @At("HEAD"),method = "deserializeTo", cancellable = true)
27-
private void puzzle$deserializeTo(JsonObject object, CallbackInfoReturnable<Vec3f> cir) {
27+
private void puzzle$deserializeTo(JsonObject object, CallbackInfoReturnable<Vector3f> cir) {
2828
if (PuzzleConfig.biggerModels) {
29-
Vec3f vec3f = this.deserializeVec3f(object, "to");
30-
if (!(vec3f.getX() < -32.0F) && !(vec3f.getY() < -32.0F) && !(vec3f.getZ() < -32.0F) && !(vec3f.getX() > 48.0F) && !(vec3f.getY() > 48.0F) && !(vec3f.getZ() > 48.0F)) {
29+
Vector3f vec3f = this.deserializeVec3f(object, "to");
30+
if (!(vec3f.x < -32.0F) && !(vec3f.y < -32.0F) && !(vec3f.z < -32.0F) && !(vec3f.x > 48.0F) && !(vec3f.y > 48.0F) && !(vec3f.z > 48.0F)) {
3131
cir.setReturnValue(vec3f);
3232
} else {
3333
throw new JsonParseException("'to' specifier exceeds the allowed boundaries: " + vec3f);
3434
}
3535
}
3636
}
3737
@Inject(at = @At("HEAD"),method = "deserializeFrom", cancellable = true)
38-
private void puzzle$deserializeFrom(JsonObject object, CallbackInfoReturnable<Vec3f> cir) {
38+
private void puzzle$deserializeFrom(JsonObject object, CallbackInfoReturnable<Vector3f> cir) {
3939
if (PuzzleConfig.biggerModels) {
40-
Vec3f vec3f = this.deserializeVec3f(object, "from");
41-
if (!(vec3f.getX() < -32.0F) && !(vec3f.getY() < -32.0F) && !(vec3f.getZ() < -32.0F) && !(vec3f.getX() > 48.0F) && !(vec3f.getY() > 48.0F) && !(vec3f.getZ() > 48.0F)) {
40+
Vector3f vec3f = this.deserializeVec3f(object, "from");
41+
if (!(vec3f.x < -32.0F) && !(vec3f.y < -32.0F) && !(vec3f.z < -32.0F) && !(vec3f.x > 48.0F) && !(vec3f.y > 48.0F) && !(vec3f.z > 48.0F)) {
4242
cir.setReturnValue(vec3f);
4343
} else {
4444
throw new JsonParseException("'from' specifier exceeds the allowed boundaries: " + vec3f);

0 commit comments

Comments
 (0)