mirror of
https://github.com/PuzzleMC/Puzzle.git
synced 2025-12-15 19:35:10 +01:00
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.
This commit is contained in:
@@ -122,18 +122,18 @@ dependencies {
|
|||||||
}
|
}
|
||||||
modImplementation ("maven.modrinth:cull-leaves:${project.cull_leaves_version}")
|
modImplementation ("maven.modrinth:cull-leaves:${project.cull_leaves_version}")
|
||||||
modImplementation ("maven.modrinth:lambdynamiclights:${project.ldl_version}")
|
modImplementation ("maven.modrinth:lambdynamiclights:${project.ldl_version}")
|
||||||
modImplementation ("maven.modrinth:lambdabettergrass:${project.lbg_version}")
|
modCompileOnlyApi ("maven.modrinth:lambdabettergrass:${project.lbg_version}")
|
||||||
modImplementation ("maven.modrinth:iris:${project.iris_version}")
|
modImplementation ("maven.modrinth:iris:${project.iris_version}")
|
||||||
modCompileOnly ("maven.modrinth:cit-resewn:${project.cit_resewn_version}")
|
modCompileOnly ("maven.modrinth:cit-resewn:${project.cit_resewn_version}")
|
||||||
modImplementation ("maven.modrinth:continuity:${project.continuity_version}")
|
modCompileOnlyApi ("maven.modrinth:continuity:${project.continuity_version}")
|
||||||
modImplementation ("maven.modrinth:animatica:${project.animatica_version}")
|
modImplementation ("maven.modrinth:animatica:${project.animatica_version}")
|
||||||
modImplementation ("maven.modrinth:colormatic:${project.colormatic_version}")
|
modCompileOnlyApi ("maven.modrinth:colormatic:${project.colormatic_version}")
|
||||||
modImplementation ("maven.modrinth:borderless-mining:${project.borderless_mining_version}")
|
modImplementation ("maven.modrinth:borderless-mining:${project.borderless_mining_version}")
|
||||||
modImplementation ("maven.modrinth:dynamic-fps:${project.dynamic_fps_version}")
|
modImplementation ("maven.modrinth:dynamic-fps:${project.dynamic_fps_version}")
|
||||||
modImplementation("com.moandjiezana.toml:toml4j:${project.toml4j_version}")
|
modImplementation("com.moandjiezana.toml:toml4j:${project.toml4j_version}")
|
||||||
modImplementation ("maven.modrinth:entitytexturefeatures:${project.entitytexturefeatures_version}")
|
modImplementation ("maven.modrinth:entitytexturefeatures:${project.entitytexturefeatures_version}")
|
||||||
modImplementation ("maven.modrinth:cem:${project.cem_version}")
|
modImplementation ("maven.modrinth:cem:${project.cem_version}")
|
||||||
modImplementation "com.gitlab.Lortseam:completeconfig:${project.complete_config_version}"
|
modImplementation "com.github.Lortseam.completeconfig:base:${project.complete_config_version}"
|
||||||
|
|
||||||
modImplementation("org.aperlambda:lambdajcommon:1.8.1") {
|
modImplementation("org.aperlambda:lambdajcommon:1.8.1") {
|
||||||
exclude group: 'com.google.code.gson'
|
exclude group: 'com.google.code.gson'
|
||||||
|
|||||||
@@ -3,33 +3,33 @@ org.gradle.jvmargs=-Xmx4G
|
|||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://fabricmc.net/use
|
# check these on https://fabricmc.net/use
|
||||||
minecraft_version=1.19
|
minecraft_version=1.19.3
|
||||||
yarn_mappings=1.19+build.4
|
yarn_mappings=1.19.3+build.5
|
||||||
loader_version=0.14.8
|
loader_version=0.14.12
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.4.0-1.19
|
mod_version = 1.4.2-1.19.3
|
||||||
maven_group = net.puzzlemc
|
maven_group = net.puzzlemc
|
||||||
archives_base_name = puzzle
|
archives_base_name = puzzle
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
||||||
fabric_version=0.57.0+1.19
|
fabric_version=0.70.0+1.19.3
|
||||||
mod_menu_version = 4.0.0
|
mod_menu_version = 5.0.2
|
||||||
|
|
||||||
cull_leaves_version = 2.3.3
|
cull_leaves_version = 3.0.2-fabric
|
||||||
ldl_version = 2.1.2+1.19
|
ldl_version = 2.2.0+1.19.3
|
||||||
lbg_version = 1.3.0+1.19
|
lbg_version = 1.3.0+1.19
|
||||||
iris_version = 1.19.x-v1.2.5
|
iris_version = 1.19.3-v1.4.6
|
||||||
continuity_version = 2.0.0+1.19
|
continuity_version = 2.0.0+1.19
|
||||||
animatica_version = 0.5+1.19
|
animatica_version = 0.5+1.19
|
||||||
colormatic_version = 3.1.2
|
colormatic_version = 3.1.2
|
||||||
borderless_mining_version = 1.1.5+1.19
|
borderless_mining_version = 1.1.6+1.19.3
|
||||||
dynamic_fps_version = 2.2.0
|
dynamic_fps_version = 2.2.0
|
||||||
toml4j_version = 0.7.2
|
toml4j_version = 0.7.2
|
||||||
cit_resewn_version = 1.1.1+1.19
|
cit_resewn_version = 1.1.1+1.19
|
||||||
cem_version = 0.7.1-1.19
|
cem_version = 0.7.1-1.19.3
|
||||||
complete_config_version = 1.0.0
|
complete_config_version = 2.2.0
|
||||||
spruceui_version=4.0.0+1.19
|
spruceui_version=4.1.0+1.19.3
|
||||||
midnightlib_version=0.5.2
|
midnightlib_version=1.1.0-fabric
|
||||||
entitytexturefeatures_version=4.0.1.fabric
|
entitytexturefeatures_version=4.2.0.1.fabric.1.19.3
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public abstract class MixinTitleScreen extends Screen {
|
|||||||
private void puzzle$mouseClicked(double mouseX, double mouseY, int button, CallbackInfoReturnable<Boolean> cir) {
|
private void puzzle$mouseClicked(double mouseX, double mouseY, int button, CallbackInfoReturnable<Boolean> cir) {
|
||||||
if (mouseX > 2 && mouseX < (double)(2 + this.puzzleTextWidth) && mouseY > (double)(this.height - yOffset) && mouseY < (double)this.height - yOffset + 10) {
|
if (mouseX > 2 && mouseX < (double)(2 + this.puzzleTextWidth) && mouseY > (double)(this.height - yOffset) && mouseY < (double)this.height - yOffset + 10) {
|
||||||
if (Objects.requireNonNull(this.client).options.getChatLinksPrompt().getValue()) {
|
if (Objects.requireNonNull(this.client).options.getChatLinksPrompt().getValue()) {
|
||||||
this.client.setScreen(new ConfirmChatLinkScreen(this::confirmLink, PuzzleCore.updateURL, true));
|
this.client.setScreen(new ConfirmLinkScreen(this::confirmLink, PuzzleCore.updateURL, true));
|
||||||
} else {
|
} else {
|
||||||
Util.getOperatingSystem().open(PuzzleCore.updateURL);
|
Util.getOperatingSystem().open(PuzzleCore.updateURL);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,21 +39,21 @@ dependencies {
|
|||||||
modImplementation ("com.terraformersmc:modmenu:${project.mod_menu_version}")
|
modImplementation ("com.terraformersmc:modmenu:${project.mod_menu_version}")
|
||||||
modImplementation ("maven.modrinth:cull-leaves:${project.cull_leaves_version}")
|
modImplementation ("maven.modrinth:cull-leaves:${project.cull_leaves_version}")
|
||||||
modImplementation ("maven.modrinth:lambdynamiclights:${project.ldl_version}")
|
modImplementation ("maven.modrinth:lambdynamiclights:${project.ldl_version}")
|
||||||
modImplementation ("maven.modrinth:lambdabettergrass:${project.lbg_version}")
|
modCompileOnlyApi ("maven.modrinth:lambdabettergrass:${project.lbg_version}")
|
||||||
modImplementation ("maven.modrinth:iris:${project.iris_version}")
|
modImplementation ("maven.modrinth:iris:${project.iris_version}")
|
||||||
modImplementation ("maven.modrinth:cit-resewn:${project.cit_resewn_version}")
|
modImplementation ("maven.modrinth:cit-resewn:${project.cit_resewn_version}")
|
||||||
modImplementation ("maven.modrinth:colormatic:${project.colormatic_version}")
|
modCompileOnlyApi ("maven.modrinth:colormatic:${project.colormatic_version}")
|
||||||
modImplementation ("maven.modrinth:borderless-mining:${project.borderless_mining_version}")
|
modImplementation ("maven.modrinth:borderless-mining:${project.borderless_mining_version}")
|
||||||
modImplementation ("maven.modrinth:dynamic-fps:${project.dynamic_fps_version}")
|
modImplementation ("maven.modrinth:dynamic-fps:${project.dynamic_fps_version}")
|
||||||
modImplementation ("maven.modrinth:entitytexturefeatures:${project.entitytexturefeatures_version}")
|
modImplementation ("maven.modrinth:entitytexturefeatures:${project.entitytexturefeatures_version}")
|
||||||
modImplementation ("maven.modrinth:cem:${project.cem_version}")
|
modImplementation ("maven.modrinth:cem:${project.cem_version}")
|
||||||
modImplementation "com.gitlab.Lortseam:completeconfig:${project.complete_config_version}"
|
modImplementation "com.github.Lortseam.completeconfig:base:${project.complete_config_version}"
|
||||||
|
|
||||||
modImplementation("org.aperlambda:lambdajcommon:1.8.1") {
|
modImplementation("org.aperlambda:lambdajcommon:1.8.1") {
|
||||||
exclude group: 'com.google.code.gson'
|
exclude group: 'com.google.code.gson'
|
||||||
exclude group: 'com.google.guava'
|
exclude group: 'com.google.guava'
|
||||||
}
|
}
|
||||||
modImplementation ("maven.modrinth:continuity:${project.continuity_version}") {
|
modCompileOnlyApi ("maven.modrinth:continuity:${project.continuity_version}") {
|
||||||
exclude module: "modmenu"
|
exclude module: "modmenu"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import shcm.shsupercm.fabric.citresewn.config.CITResewnConfig;
|
|||||||
import traben.entity_texture_features.ETFApi;
|
import traben.entity_texture_features.ETFApi;
|
||||||
import traben.entity_texture_features.config.ETFConfig;
|
import traben.entity_texture_features.config.ETFConfig;
|
||||||
import io.github.kvverti.colormatic.ColormaticConfig;
|
import io.github.kvverti.colormatic.ColormaticConfig;
|
||||||
|
import traben.entity_texture_features.texture_handlers.ETFManager;
|
||||||
|
|
||||||
public class PuzzleClient implements ClientModInitializer {
|
public class PuzzleClient implements ClientModInitializer {
|
||||||
|
|
||||||
@@ -265,9 +266,9 @@ public class PuzzleClient implements ClientModInitializer {
|
|||||||
etfConfig.enableEmissiveTextures = !etfConfig.enableEmissiveTextures;
|
etfConfig.enableEmissiveTextures = !etfConfig.enableEmissiveTextures;
|
||||||
ETFApi.saveETFConfigChangesAndResetETF();
|
ETFApi.saveETFConfigChangesAndResetETF();
|
||||||
}));
|
}));
|
||||||
PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.translatable("config.entity_texture_features.full_bright_emissives.title"), (button) -> button.setMessage(
|
PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.translatable("config.entity_texture_features.emissive_mode.title"), (button) -> button.setMessage(
|
||||||
etfConfig.fullBrightEmissives ? Text.translatable("entity_texture_features.puzzle.emissive_type.brighter") : Text.translatable("entity_texture_features.puzzle.emissive_type.default")), (button) -> {
|
Text.literal(etfConfig.emissiveRenderMode.toString())), (button) -> {
|
||||||
etfConfig.fullBrightEmissives = !etfConfig.fullBrightEmissives ;
|
etfConfig.emissiveRenderMode = etfConfig.emissiveRenderMode.next();
|
||||||
ETFApi.saveETFConfigChangesAndResetETF();
|
ETFApi.saveETFConfigChangesAndResetETF();
|
||||||
}));
|
}));
|
||||||
PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.translatable("config.entity_texture_features.blinking_mob_settings.title"), (button) -> button.setMessage(etfConfig.enableBlinking ? YES : NO), (button) -> {
|
PuzzleApi.addToResourceOptions(new PuzzleWidget(Text.translatable("config.entity_texture_features.blinking_mob_settings.title"), (button) -> button.setMessage(etfConfig.enableBlinking ? YES : NO), (button) -> {
|
||||||
|
|||||||
@@ -31,11 +31,11 @@ public class PuzzleOptionsScreen extends Screen {
|
|||||||
PerformancePage performancePage = new PerformancePage(this);
|
PerformancePage performancePage = new PerformancePage(this);
|
||||||
ResourcesPage resourcesPage = new ResourcesPage(this);
|
ResourcesPage resourcesPage = new ResourcesPage(this);
|
||||||
|
|
||||||
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)));
|
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());
|
||||||
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)));
|
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());
|
||||||
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)));
|
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());
|
||||||
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)));
|
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());
|
||||||
this.addDrawableChild(new ButtonWidget(this.width / 2 - 100, this.height / 6 + 168, 200, 20, ScreenTexts.DONE, (button) -> Objects.requireNonNull(client).setScreen(parent)));
|
this.addDrawableChild(ButtonWidget.builder(ScreenTexts.DONE, (button) -> Objects.requireNonNull(client).setScreen(parent)).dimensions(this.width / 2 - 100, this.height / 6 + 168, 200, 20).build());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public abstract class AbstractPuzzleOptionsPage extends Screen {
|
|||||||
|
|
||||||
super.init();
|
super.init();
|
||||||
|
|
||||||
this.addDrawableChild(new ButtonWidget(this.width / 2 - 100, this.height - 28, 200, 20, ScreenTexts.DONE, (button) -> Objects.requireNonNull(client).setScreen(parent)));
|
this.addDrawableChild(ButtonWidget.builder(ScreenTexts.DONE, (button) -> Objects.requireNonNull(client).setScreen(parent)).dimensions(this.width / 2 - 100, this.height - 28, 200, 20).build());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -4,11 +4,13 @@ import net.minecraft.client.gui.widget.ButtonWidget;
|
|||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
public class PuzzleButtonWidget extends ButtonWidget {
|
public class PuzzleButtonWidget extends ButtonWidget {
|
||||||
private final PuzzleWidget.TextAction title;
|
private final PuzzleWidget.TextAction title;
|
||||||
|
|
||||||
public PuzzleButtonWidget(int x, int y, int width, int height, PuzzleWidget.TextAction title, PressAction onPress) {
|
public PuzzleButtonWidget(int x, int y, int width, int height, PuzzleWidget.TextAction title, PressAction onPress) {
|
||||||
super(x, y, width, height, Text.of(""), onPress);
|
super(x, y, width, height, Text.of(""), onPress, Supplier::get);
|
||||||
this.title = title;
|
this.title = title;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ public class PuzzleOptionListWidget extends ElementListWidget<PuzzleOptionListWi
|
|||||||
|
|
||||||
public void render(MatrixStack matrices, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta) {
|
public void render(MatrixStack matrices, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta) {
|
||||||
if (button != null) {
|
if (button != null) {
|
||||||
button.y = y;
|
button.setY(y);
|
||||||
button.render(matrices, mouseX, mouseY, tickDelta);
|
button.render(matrices, mouseX, mouseY, tickDelta);
|
||||||
}
|
}
|
||||||
if (button == null) drawCenteredText(matrices,textRenderer, Text.literal("------ ").append(text).append(" ------"),x + 200,y+5,0xFFFFFF);
|
if (button == null) drawCenteredText(matrices,textRenderer, Text.literal("------ ").append(text).append(" ------"),x + 200,y+5,0xFFFFFF);
|
||||||
@@ -105,10 +105,10 @@ public class PuzzleOptionListWidget extends ElementListWidget<PuzzleOptionListWi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
public int getY() {
|
public int getY() {
|
||||||
return button.y;
|
return button.getY();
|
||||||
}
|
}
|
||||||
public int getX() {
|
public int getX() {
|
||||||
return button.x;
|
return button.getX();
|
||||||
}
|
}
|
||||||
public int getHeight() {
|
public int getHeight() {
|
||||||
return button.getHeight();
|
return button.getHeight();
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import com.google.gson.JsonObject;
|
|||||||
import com.google.gson.JsonParseException;
|
import com.google.gson.JsonParseException;
|
||||||
import net.minecraft.client.render.model.json.ModelElement;
|
import net.minecraft.client.render.model.json.ModelElement;
|
||||||
import net.minecraft.util.JsonHelper;
|
import net.minecraft.util.JsonHelper;
|
||||||
import net.minecraft.util.math.Vec3f;
|
|
||||||
import net.puzzlemc.core.config.PuzzleConfig;
|
import net.puzzlemc.core.config.PuzzleConfig;
|
||||||
|
import org.joml.Vector3f;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
@@ -14,7 +14,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||||||
|
|
||||||
@Mixin(ModelElement.Deserializer.class)
|
@Mixin(ModelElement.Deserializer.class)
|
||||||
public abstract class MixinModelElementDeserializer {
|
public abstract class MixinModelElementDeserializer {
|
||||||
@Shadow protected abstract Vec3f deserializeVec3f(JsonObject object, String name);
|
@Shadow protected abstract Vector3f deserializeVec3f(JsonObject object, String name);
|
||||||
|
|
||||||
@Inject(at = @At("HEAD"),method = "deserializeRotationAngle", cancellable = true)
|
@Inject(at = @At("HEAD"),method = "deserializeRotationAngle", cancellable = true)
|
||||||
private void puzzle$deserializeRotationAngle(JsonObject object, CallbackInfoReturnable<Float> cir) {
|
private void puzzle$deserializeRotationAngle(JsonObject object, CallbackInfoReturnable<Float> cir) {
|
||||||
@@ -24,10 +24,10 @@ public abstract class MixinModelElementDeserializer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
@Inject(at = @At("HEAD"),method = "deserializeTo", cancellable = true)
|
@Inject(at = @At("HEAD"),method = "deserializeTo", cancellable = true)
|
||||||
private void puzzle$deserializeTo(JsonObject object, CallbackInfoReturnable<Vec3f> cir) {
|
private void puzzle$deserializeTo(JsonObject object, CallbackInfoReturnable<Vector3f> cir) {
|
||||||
if (PuzzleConfig.biggerModels) {
|
if (PuzzleConfig.biggerModels) {
|
||||||
Vec3f vec3f = this.deserializeVec3f(object, "to");
|
Vector3f vec3f = this.deserializeVec3f(object, "to");
|
||||||
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)) {
|
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)) {
|
||||||
cir.setReturnValue(vec3f);
|
cir.setReturnValue(vec3f);
|
||||||
} else {
|
} else {
|
||||||
throw new JsonParseException("'to' specifier exceeds the allowed boundaries: " + vec3f);
|
throw new JsonParseException("'to' specifier exceeds the allowed boundaries: " + vec3f);
|
||||||
@@ -35,10 +35,10 @@ public abstract class MixinModelElementDeserializer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
@Inject(at = @At("HEAD"),method = "deserializeFrom", cancellable = true)
|
@Inject(at = @At("HEAD"),method = "deserializeFrom", cancellable = true)
|
||||||
private void puzzle$deserializeFrom(JsonObject object, CallbackInfoReturnable<Vec3f> cir) {
|
private void puzzle$deserializeFrom(JsonObject object, CallbackInfoReturnable<Vector3f> cir) {
|
||||||
if (PuzzleConfig.biggerModels) {
|
if (PuzzleConfig.biggerModels) {
|
||||||
Vec3f vec3f = this.deserializeVec3f(object, "from");
|
Vector3f vec3f = this.deserializeVec3f(object, "from");
|
||||||
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)) {
|
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)) {
|
||||||
cir.setReturnValue(vec3f);
|
cir.setReturnValue(vec3f);
|
||||||
} else {
|
} else {
|
||||||
throw new JsonParseException("'from' specifier exceeds the allowed boundaries: " + vec3f);
|
throw new JsonParseException("'from' specifier exceeds the allowed boundaries: " + vec3f);
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import java.nio.file.Files;
|
|||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.nio.file.StandardCopyOption;
|
import java.nio.file.StandardCopyOption;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
public class PuzzleSplashScreen implements ClientModInitializer {
|
public class PuzzleSplashScreen implements ClientModInitializer {
|
||||||
@@ -138,9 +139,9 @@ public class PuzzleSplashScreen implements ClientModInitializer {
|
|||||||
|
|
||||||
protected TextureData loadTextureData(ResourceManager resourceManager) {
|
protected TextureData loadTextureData(ResourceManager resourceManager) {
|
||||||
MinecraftClient minecraftClient = MinecraftClient.getInstance();
|
MinecraftClient minecraftClient = MinecraftClient.getInstance();
|
||||||
DefaultResourcePack defaultResourcePack = minecraftClient.getResourcePackProvider().getPack();
|
DefaultResourcePack defaultResourcePack = minecraftClient.getDefaultResourcePack();
|
||||||
try {
|
try {
|
||||||
InputStream inputStream = defaultResourcePack.open(ResourceType.CLIENT_RESOURCES, LOGO);
|
InputStream inputStream = Objects.requireNonNull(defaultResourcePack.open(ResourceType.CLIENT_RESOURCES, LOGO)).get();
|
||||||
TextureData var6;
|
TextureData var6;
|
||||||
try {
|
try {
|
||||||
var6 = new TextureData(new TextureResourceMetadata(true, true), NativeImage.read(inputStream));
|
var6 = new TextureData(new TextureResourceMetadata(true, true), NativeImage.read(inputStream));
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ public abstract class MixinSplashScreen extends Overlay {
|
|||||||
RenderSystem.enableBlend();
|
RenderSystem.enableBlend();
|
||||||
RenderSystem.blendEquation(32774);
|
RenderSystem.blendEquation(32774);
|
||||||
RenderSystem.defaultBlendFunc();
|
RenderSystem.defaultBlendFunc();
|
||||||
RenderSystem.setShader(GameRenderer::getPositionTexShader);
|
RenderSystem.setShader(GameRenderer::getPositionTexProgram);
|
||||||
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, s);
|
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, s);
|
||||||
drawTexture(matrices, 0, 0, 0, 0, 0, width, height, width, height);
|
drawTexture(matrices, 0, 0, 0, 0, 0, width, height, width, height);
|
||||||
RenderSystem.defaultBlendFunc();
|
RenderSystem.defaultBlendFunc();
|
||||||
|
|||||||
Reference in New Issue
Block a user