diff --git a/1.19.1.properties b/1.19.1.properties index 9e75b81b6..81fa57f34 100644 --- a/1.19.1.properties +++ b/1.19.1.properties @@ -3,7 +3,7 @@ java_version = 17 minecraft_version=1.19.1 parchment_version=2022.03.13 -compatible_minecraft_versions=["1.19.1"] +compatible_minecraft_versions=["1.19", "1.19.1"] # Fabric loader fabric_loader_version=0.14.8 diff --git a/1.19.3.properties b/1.19.3.properties new file mode 100644 index 000000000..9dab26b54 --- /dev/null +++ b/1.19.3.properties @@ -0,0 +1,43 @@ +# 1.18.2 version based stuff + +java_version = 17 +minecraft_version=1.19.3 +parchment_version=2022.03.13 +compatible_minecraft_versions=["1.19.3"] + +# Fabric loader +fabric_loader_version=0.14.11 +fabric_api_version=0.68.1+1.19.3 + # Fabric mod versions + modmenu_version=5.0.2 + starlight_version_fabric=0 + phosphor_version_fabric=0 + lithium_version=0 + sodium_version=4145281 + iris_version=1.19.x-v1.2.6 + immersive_portals_version = 0 + bclib_version=0 + + # Fabric mod run + # 0 = Don't enable and don't run + # 1 = Can be referenced in code but doesn't run + # 2 = Can be referenced in code and runs in client + enable_starlight=0 + enable_phosphor=0 + enable_sodium=1 + enable_lithium=0 + enable_iris=0 + enable_bclib=0 + +# Forge loader +forge_version=44.0.6 + # Forge mod versions + starlight_version_forge=0 + terraforged_version= + + # Forge mod run + # 0 = Don't enable and don't run + # 1 = Can be referenced in code but doesn't run + # 2 = Can be referenced in code and runs in client + enable_starlight_forge=0 + enable_terraforged=0 diff --git a/Readme.md b/Readme.md index 9ebe426f8..fc9df62a0 100644 --- a/Readme.md +++ b/Readme.md @@ -16,8 +16,9 @@ If you want to see a quick demo, check out a video covering the mod here: ### Versions This branch is for these versions of Minecraft -- 1.19.1 -- 1.19 +- 1.19.3 +- 1.19.2 +- 1.19.1 & 1.19 - 1.18.2 - 1.18.1 & 1.18 - 1.17.1 & 1.17 @@ -27,16 +28,23 @@ Architectury version: 3.4-SNAPSHOT\ Architectury loom version: 0.12.0-SNAPSHOT\ Java Compiler plugin: Manifold Preprocessor -#### 1.19.1 mods -Forge version: 42.0.0\ + +#### 1.19.3 mods +Forge version: 44.0.6\ +Fabric version: 0.14.11\ +Fabric API version: 0.68.1+1.19.3\ +Modmenu version: 5.0.2 + +#### 1.19.2 mods +Forge version: 43.0.0\ Fabric version: 0.14.8\ Fabric API version: 0.58.5+1.19.1\ Modmenu version: 4.0.0 -#### 1.19 mods -Forge version: 41.0.94\ +#### 1.19.1 mods +Forge version: 42.0.0\ Fabric version: 0.14.8\ -Fabric API version: 0.57.0+1.19\ +Fabric API version: 0.58.5+1.19.1\ Modmenu version: 4.0.0 #### 1.18.2 mods diff --git a/build.gradle b/build.gradle index b2b4b0393..f7254bc32 100644 --- a/build.gradle +++ b/build.gradle @@ -87,7 +87,8 @@ def loadProperties() { "1.18.1": "1_18", "1.18.2": "1_18", "1.19.1" : "1_19", - "1.19.2" : "1_19" + "1.19.2" : "1_19", + "1.19.3" : "1_19" ] // Use this as sometimes multiple versions use the same access wideners rootProject.ext.set("acsessWidenerVersion", mcVersionToAcsessWidenerVersion.get(mcVersion)) @@ -240,7 +241,12 @@ subprojects { p -> // Mojmap mappings officialMojangMappings() // Parchment mappings (it adds parameter mappings & javadoc) - if (rootProject.minecraft_version != "1.19" && rootProject.minecraft_version != "1.19.1" && rootProject.minecraft_version != "1.19.2") + if ( + rootProject.minecraft_version != "1.19" + && rootProject.minecraft_version != "1.19.1" + && rootProject.minecraft_version != "1.19.2" + && rootProject.minecraft_version != "1.19.3" + ) // We are not gonna use this build script anymore so dont bother fixing this parchment("org.parchmentmc.data:parchment-${rootProject.minecraft_version}:${rootProject.parchment_version}@zip") else parchment("org.parchmentmc.data:parchment-1.18.2:${rootProject.parchment_version}@zip") // As 1.19.x or higher doesnt have parchment mappings yet, we use 1.18.2 mapping diff --git a/common/build.gradle b/common/build.gradle index 2c90fa9ef..5b1702d8f 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -33,10 +33,15 @@ dependencies { // Mojmap mappings officialMojangMappings() // Parchment mappings (it adds parameter mappings & javadoc) - if (rootProject.minecraft_version != "1.19" && rootProject.minecraft_version != "1.19.1" && rootProject.minecraft_version != "1.19.2") + if ( + rootProject.minecraft_version != "1.19" + && rootProject.minecraft_version != "1.19.1" + && rootProject.minecraft_version != "1.19.2" + && rootProject.minecraft_version != "1.19.3" + ) // We are not gonna use this build script anymore so dont bother fixing this parchment("org.parchmentmc.data:parchment-${rootProject.minecraft_version}:${rootProject.parchment_version}@zip") else - parchment("org.parchmentmc.data:parchment-1.18.2:${rootProject.parchment_version}@zip") // As 1.19 dosnt have parchment mappings yet, we use 1.18.2 mapping + parchment("org.parchmentmc.data:parchment-1.18.2:${rootProject.parchment_version}@zip") // As 1.19.x or higher doesnt have parchment mappings yet, we use 1.18.2 mapping } //Manifold diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/McObjectConverter.java b/common/src/main/java/com/seibel/lod/common/wrappers/McObjectConverter.java index 5cd741b83..259c707fa 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/McObjectConverter.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/McObjectConverter.java @@ -21,7 +21,11 @@ package com.seibel.lod.common.wrappers; import java.nio.FloatBuffer; +#if PRE_MC_1_19_3 import com.mojang.math.Matrix4f; +#else +import org.joml.Matrix4f; +#endif import com.seibel.lod.common.wrappers.block.BlockPosWrapper; import com.seibel.lod.core.enums.LodDirection; import com.seibel.lod.core.objects.math.Mat4f; @@ -43,7 +47,11 @@ public class McObjectConverter public static Mat4f Convert(Matrix4f mcMatrix) { FloatBuffer buffer = FloatBuffer.allocate(16); + #if PRE_MC_1_19_3 mcMatrix.store(buffer); + #else + mcMatrix.add(buffer); + #endif Mat4f matrix = new Mat4f(buffer); matrix.transpose(); return matrix; diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/block/BlockDetailWrapper.java b/common/src/main/java/com/seibel/lod/common/wrappers/block/BlockDetailWrapper.java index 9f9ed03ec..8aa18c8eb 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/block/BlockDetailWrapper.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/block/BlockDetailWrapper.java @@ -108,9 +108,21 @@ public class BlockDetailWrapper extends IBlockDetailWrapper { // textures normally use u and v instead of x and y - for (int u = 0; u < texture.getWidth(); u++) + for (int u = 0; u < + #if PRE_MC_1_19_3 + texture.getWidth(); + #else + texture.contents().width(); + #endif + u++) { - for (int v = 0; v < texture.getHeight(); v++) + for (int v = 0; v < + #if PRE_MC_1_19_3 + texture.getHeight(); + #else + texture.contents().height(); + #endif + v++) { //note: Minecraft color format is: 0xAA BB GG RR //________ DH mod color format is: 0xAA RR GG BB diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/config/ConfigGui.java b/common/src/main/java/com/seibel/lod/common/wrappers/config/ConfigGui.java index a7f6736af..ab5e1e2da 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/config/ConfigGui.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/config/ConfigGui.java @@ -781,17 +781,29 @@ public abstract class ConfigGui { if (button != null) { - button.y = y; + #if PRE_MC_1_19_3 + resetButton.y = y; + #else + resetButton.setY(y); + #endif button.render(matrices, mouseX, mouseY, tickDelta); } if (resetButton != null) { + #if PRE_MC_1_19_3 resetButton.y = y; + #else + resetButton.setY(y); + #endif resetButton.render(matrices, mouseX, mouseY, tickDelta); } if (indexButton != null) { - indexButton.y = y; + #if PRE_MC_1_19_3 + resetButton.y = y; + #else + resetButton.setY(y); + #endif indexButton.render(matrices, mouseX, mouseY, tickDelta); } if (text != null && (!text.getString().contains("spacer") || button != null)) diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/config/TexturedButtonWidget.java b/common/src/main/java/com/seibel/lod/common/wrappers/config/TexturedButtonWidget.java index 102e69491..507ebf868 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/config/TexturedButtonWidget.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/config/TexturedButtonWidget.java @@ -45,9 +45,9 @@ public class TexturedButtonWidget extends ImageButton { super(x, y, width, height, u, v, hoveredVOffset, texture, textureWidth, textureHeight, pressAction, text); } - public TexturedButtonWidget(int x, int y, int width, int height, int u, int v, int hoveredVOffset, ResourceLocation texture, int textureWidth, int textureHeight, OnPress pressAction, OnTooltip tooltipSupplier, Component text) { - super(x, y, width, height, u, v, hoveredVOffset, texture, textureWidth, textureHeight, pressAction, tooltipSupplier, text); - } +// public TexturedButtonWidget(int x, int y, int width, int height, int u, int v, int hoveredVOffset, ResourceLocation texture, int textureWidth, int textureHeight, OnPress pressAction, OnTooltip tooltipSupplier, Component text) { +// super(x, y, width, height, u, v, hoveredVOffset, texture, textureWidth, textureHeight, pressAction, tooltipSupplier, text); +// } @Override public void renderButton(PoseStack matrices, int mouseX, int mouseY, float delta) { @@ -64,8 +64,13 @@ public class TexturedButtonWidget extends ImageButton { RenderSystem.enableBlend(); RenderSystem.defaultBlendFunc(); RenderSystem.enableDepthTest(); + #if PRE_MC_1_19_3 this.blit(matrices, this.x, this.y, 0, 46 + i * 20, this.width / 2, this.height); this.blit(matrices, this.x + this.width / 2, this.y, 200 - this.width / 2, 46 + i * 20, this.width / 2, this.height); + #else + this.blit(matrices, this.getX(), this.getY(), 0, 46 + i * 20, this.getWidth() / 2, this.getHeight()); + this.blit(matrices, this.getX() + this.getWidth() / 2, this.getY(), 200 - this.width / 2, 46 + i * 20, this.getWidth() / 2, this.getHeight()); + #endif super.renderButton(matrices, mouseX, mouseY, delta); } diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/minecraft/MinecraftRenderWrapper.java b/common/src/main/java/com/seibel/lod/common/wrappers/minecraft/MinecraftRenderWrapper.java index 5dfdad34e..a02e8efb6 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/minecraft/MinecraftRenderWrapper.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/minecraft/MinecraftRenderWrapper.java @@ -37,8 +37,11 @@ import com.seibel.lod.core.util.LodUtil; import com.seibel.lod.core.wrapperInterfaces.misc.ILightMapWrapper; import net.minecraft.client.renderer.LightTexture; - +#if PRE_MC_1_19_3 import com.mojang.math.Vector3f; +#else +import org.joml.Vector3f; +#endif import com.seibel.lod.core.objects.math.Mat4f; import com.seibel.lod.core.objects.math.Vec3d; import com.seibel.lod.core.objects.math.Vec3f; diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/world/BiomeWrapper.java b/common/src/main/java/com/seibel/lod/common/wrappers/world/BiomeWrapper.java index 659d7df45..5f7bb6f5a 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/world/BiomeWrapper.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/world/BiomeWrapper.java @@ -32,7 +32,12 @@ import com.google.common.collect.ImmutableList; import com.seibel.lod.core.util.LodUtil; import com.seibel.lod.core.wrapperInterfaces.world.IBiomeWrapper; +#if PRE_MC_1_19_3 import net.minecraft.data.BuiltinRegistries; +#else +import net.minecraft.core.registries.BuiltInRegistries; +#endif + #if POST_MC_1_19 import net.minecraft.data.worldgen.biome.EndBiomes; import net.minecraft.data.worldgen.biome.NetherBiomes; @@ -188,7 +193,11 @@ public class BiomeWrapper implements IBiomeWrapper } private static Biome _get(ResourceKey r) { + #if PRE_MC_1_19_3 return BuiltinRegistries.BIOME.getOrThrow(r); + #else + return BuiltInRegistries.BIOME.getOrThrow(r); + #endif } //FIXME: THIS IS HELL! diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/WorldGenStructFeatManager.java b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/WorldGenStructFeatManager.java index 3f07909a4..7adef654e 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/WorldGenStructFeatManager.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/mimicObject/WorldGenStructFeatManager.java @@ -68,7 +68,10 @@ public class WorldGenStructFeatManager extends StructureManager { public WorldGenStructFeatManager(WorldGenSettings worldGenSettings, WorldGenLevel genLevel #if POST_MC_1_18_1, StructureCheck structureCheck #endif) { - super(genLevel, worldGenSettings #if POST_MC_1_18_1, structureCheck #endif); + super(genLevel, + worldGenSettings #if POST_MC_1_19_3 .options() #endif + #if POST_MC_1_18_1, structureCheck #endif + ); this.genLevel = genLevel; this.worldGenSettings = worldGenSettings; } diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/step/StepBiomes.java b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/step/StepBiomes.java index d68f9bc9c..a96650ea3 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/step/StepBiomes.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/worldGeneration/step/StepBiomes.java @@ -76,9 +76,12 @@ public final class StepBiomes { #elif PRE_MC_1_19 chunk = environment.joinSync(environment.params.generator.createBiomes(environment.params.biomes, Runnable::run, Blender.of(worldGenRegion), tParams.structFeat.forWorldGenRegion(worldGenRegion), chunk)); - #else + #elif PRE_MC_1_19_3 chunk = environment.joinSync(environment.params.generator.createBiomes(environment.params.biomes, Runnable::run, environment.params.randomState, Blender.of(worldGenRegion), tParams.structFeat.forWorldGenRegion(worldGenRegion), chunk)); + #else + chunk = environment.joinSync(environment.params.generator.createBiomes(Runnable::run, environment.params.randomState, Blender.of(worldGenRegion), + tParams.structFeat.forWorldGenRegion(worldGenRegion), chunk)); #endif } } diff --git a/fabric/build.gradle b/fabric/build.gradle index 2714a6c8b..f49d46c4e 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -107,10 +107,15 @@ dependencies { // Mojmap mappings officialMojangMappings() // Parchment mappings (it adds parameter mappings & javadoc) - if (rootProject.minecraft_version != "1.19" && rootProject.minecraft_version != "1.19.1" && rootProject.minecraft_version != "1.19.2") + if ( + rootProject.minecraft_version != "1.19" + && rootProject.minecraft_version != "1.19.1" + && rootProject.minecraft_version != "1.19.2" + && rootProject.minecraft_version != "1.19.3" + ) // We are not gonna use this build script anymore so dont bother fixing this parchment("org.parchmentmc.data:parchment-${rootProject.minecraft_version}:${rootProject.parchment_version}@zip") else - parchment("org.parchmentmc.data:parchment-1.18.2:${rootProject.parchment_version}@zip") // As 1.19 dosnt have parchment mappings yet, we use 1.18.2 mapping + parchment("org.parchmentmc.data:parchment-1.18.2:${rootProject.parchment_version}@zip") // As 1.19.x or higher doesnt have parchment mappings yet, we use 1.18.2 mapping } //Manifold diff --git a/forge/build.gradle b/forge/build.gradle index e76a7c32d..78e567c85 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -61,10 +61,15 @@ dependencies { // Mojmap mappings officialMojangMappings() // Parchment mappings (it adds parameter mappings & javadoc) - if (rootProject.minecraft_version != "1.19" && rootProject.minecraft_version != "1.19.1" && rootProject.minecraft_version != "1.19.2") + if ( + rootProject.minecraft_version != "1.19" + && rootProject.minecraft_version != "1.19.1" + && rootProject.minecraft_version != "1.19.2" + && rootProject.minecraft_version != "1.19.3" + ) // We are not gonna use this build script anymore so dont bother fixing this parchment("org.parchmentmc.data:parchment-${rootProject.minecraft_version}:${rootProject.parchment_version}@zip") else - parchment("org.parchmentmc.data:parchment-1.18.2:${rootProject.parchment_version}@zip") // As 1.19 dosnt have parchment mappings yet, we use 1.18.2 mapping + parchment("org.parchmentmc.data:parchment-1.18.2:${rootProject.parchment_version}@zip") // As 1.19.x or higher doesnt have parchment mappings yet, we use 1.18.2 mapping } //Manifold diff --git a/gradle.properties b/gradle.properties index dd270d76f..15c79f047 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,7 +17,7 @@ mod_issues=https://gitlab.com/jeseibel/minecraft-lod-mod/-/issues toml_version=3.6.4 manifold_version=2022.1.18 enabled_platforms=fabric,forge -mcVersions=1.16.5,1.17.1,1.18.1,1.18.2,1.19,1.19.1,1.19.2 +mcVersions=1.16.5,1.17.1,1.18.1,1.18.2,1.19,1.19.1,1.19.2,1.19.3 ##### FOR IDE SUPPORT AND TELL IDE TO USE CERTIAN MC VERSION: SWITCH THIS: -mcVer=1.19.2 \ No newline at end of file +mcVer=1.19.3 \ No newline at end of file