Compare commits

..

6 Commits

19 changed files with 38 additions and 158 deletions
-26
View File
@@ -3,7 +3,6 @@ image: gradle:eclipse-temurin
# all stages need to be defined here
stages:
- build_19_1
- build_19
- build_18_2
- build_18_1
@@ -150,31 +149,6 @@ build_19:
- cache/
allow_failure: true
# 1.19.1 build
build_19_1:
stage: build_19_1
script:
- echo "Building 1.19.1..."
- ./gradlew deleteMerged -PmcVer="1.19.1" --gradle-user-home cache/;
- ./gradlew clean -PmcVer="1.19.1" --gradle-user-home cache/;
- ./gradlew core:build -PmcVer="1.19.1" --gradle-user-home cache/;
- ./gradlew build -PmcVer="1.19.1" --gradle-user-home cache/;
- ./gradlew mergeJars -PmcVer="1.19.1" --gradle-user-home cache/;
image: eclipse-temurin:17
artifacts:
name: "Merged_NightlyBuild_1_19-${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_TIMESTAMP}"
paths:
- Merged
expire_in: 1 day
when: always
cache:
key: "gradleCache"
policy: pull-push
paths:
- .gradle
- cache/
allow_failure: true
# unused deployment stage
#deploy:
-43
View File
@@ -1,43 +0,0 @@
# 1.18.2 version based stuff
java_version = 17
minecraft_version=1.19.1
parchment_version=2022.03.13
compatible_minecraft_versions=["1.19.1"]
# Fabric loader
fabric_loader_version=0.14.8
fabric_api_version=0.58.5+1.19.1
# Fabric mod versions
modmenu_version=4.0.0
starlight_version_fabric=0
phosphor_version_fabric=0
lithium_version=0
sodium_version=3820973
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=42.0.0
# 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
-43
View File
@@ -1,43 +0,0 @@
# 1.18.2 version based stuff
java_version = 17
minecraft_version=1.19.2
parchment_version=2022.03.13
compatible_minecraft_versions=["1.19.2"]
# Fabric loader
fabric_loader_version=0.14.8
fabric_api_version=0.58.5+1.19.1
# Fabric mod versions
modmenu_version=4.0.0
starlight_version_fabric=0
phosphor_version_fabric=0
lithium_version=0
sodium_version=3820973
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=43.0.0
# 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
+1 -1
View File
@@ -14,7 +14,7 @@ fabric_api_version=0.57.0+1.19
phosphor_version_fabric=0
lithium_version=0
sodium_version=3820973
iris_version=1.19.x-v1.2.6
iris_version=1.19.x-v1.2.5
immersive_portals_version = 0
bclib_version=0
+1 -10
View File
@@ -16,7 +16,6 @@ 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.18.2
- 1.18.1 & 1.18
@@ -27,12 +26,6 @@ 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\
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\
Fabric version: 0.14.8\
@@ -73,7 +66,6 @@ This version has been confirmed to work in IDE and Retail Minecraft with ether t
#### Nightlly builds
This mod has an autobuild system to automatically build the mod on each commit
- 1.19.1: https://gitlab.com/jeseibel/minecraft-lod-mod/-/jobs/artifacts/1.6.4a_dev/download?job=build_19_1
- 1.19: https://gitlab.com/jeseibel/minecraft-lod-mod/-/jobs/artifacts/1.6.4a_dev/download?job=build_19
- 1.18.2: https://gitlab.com/jeseibel/minecraft-lod-mod/-/jobs/artifacts/1.6.4a_dev/download?job=build_18_2
- 1.18.1: https://gitlab.com/jeseibel/minecraft-lod-mod/-/jobs/artifacts/1.6.4a_dev/download?job=build_18_1
@@ -101,8 +93,7 @@ https://fabricmc.net/wiki/tutorial:setup
4. Import the project into eclipse
## Switching Versions
This branch support 6 built versions:
- 1.19.1
This branch support 5 built versions:
- 1.19
- 1.18.2
- 1.18.1 (which also runs on 1.18)
+4 -5
View File
@@ -53,7 +53,7 @@ def writeBuildGradlePredefine(List<String> mcVers, int mcIndex) {
// Sets up the variables for Manifold in the code
def loadProperties() {
def defaultMcVersion = "1.19.2"
def defaultMcVersion = "1.19"
def mcVersion = ""
def mcVers = mcVersions.split(",")
int mcIndex = -1
@@ -86,8 +86,7 @@ def loadProperties() {
"1.17.1": "1_17",
"1.18.1": "1_18",
"1.18.2": "1_18",
"1.19.1" : "1_19",
"1.19.2" : "1_19"
"1.19" : "1_19"
]
// Use this as sometimes multiple versions use the same access wideners
rootProject.ext.set("acsessWidenerVersion", mcVersionToAcsessWidenerVersion.get(mcVersion))
@@ -240,10 +239,10 @@ 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")
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
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
}
//Manifold
+1 -1
View File
@@ -33,7 +33,7 @@ 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")
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
@@ -157,13 +157,14 @@ public class BlockDetailWrapper extends IBlockDetailWrapper
(int) (Math.sqrt(blue / count)*255.));
}
// TODO: Remove this when transparency is added!
/*
double colorAlpha = ColorUtil.getAlpha(tempColor)/255.;
tempColor = ColorUtil.rgbToInt(
ColorUtil.getAlpha(tempColor),
(int)(ColorUtil.getRed(tempColor) * colorAlpha),
(int)(ColorUtil.getGreen(tempColor) * colorAlpha),
(int)(ColorUtil.getBlue(tempColor) * colorAlpha)
);
);*/
return tempColor;
}
@@ -244,6 +245,7 @@ public class BlockDetailWrapper extends IBlockDetailWrapper
}
} else { // Liquid Block
dontOccludeFaces = new boolean[6];
Arrays.fill(dontOccludeFaces, true);
}
}
+1 -1
Submodule core updated: 5f116f0ea7...6f4b0a54e9
+1 -1
View File
@@ -107,7 +107,7 @@ 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")
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
@@ -49,7 +49,7 @@ public class MixinFogRenderer {
private static final float A_EVEN_LARGER_VALUE = 42069420694206942069.F;
@Inject(at = @At("RETURN"), method = "setupFog")
#if PRE_MC_1_19_1
#if PRE_MC_1_19
private static void disableSetupFog(Camera camera, FogMode fogMode, float f, boolean bl, CallbackInfo callback) {
#else
private static void disableSetupFog(Camera camera, FogMode fogMode, float f, boolean bl, float g, CallbackInfo callback) {
@@ -27,7 +27,7 @@ import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton;
import net.minecraft.client.gui.screens.OptionsScreen;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.network.chat.Component;
#if PRE_MC_1_19_1
#if PRE_MC_1_19
import net.minecraft.network.chat.TranslatableComponent;
#endif
import net.minecraft.resources.ResourceLocation;
@@ -69,7 +69,7 @@ public class MixinOptionsScreen extends Screen {
// For now it goes to the client option by default
(buttonWidget) -> Objects.requireNonNull(minecraft).setScreen(ConfigGui.getScreen(this, "client")),
// Add a title to the screen
#if PRE_MC_1_19_1
#if PRE_MC_1_19
new TranslatableComponent("text.autoconfig." + ModInfo.ID + ".title")));
#else
Component.translatable("text.autoconfig." + ModInfo.ID + ".title")));
+1 -1
View File
@@ -61,7 +61,7 @@ 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")
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
@@ -35,7 +35,7 @@ import com.seibel.lod.common.wrappers.world.WorldWrapper;
import net.minecraft.client.Minecraft;
import net.minecraftforge.client.event.InputEvent;
import net.minecraftforge.event.TickEvent;
#if PRE_MC_1_19_1
#if PRE_MC_1_19
import net.minecraftforge.event.world.BlockEvent;
import net.minecraftforge.event.world.ChunkEvent;
import net.minecraftforge.event.world.WorldEvent;
@@ -70,7 +70,7 @@ public class ForgeClientProxy
@SubscribeEvent
public void chunkLoadEvent(ChunkEvent.Load event)
{
#if PRE_MC_1_19_1
#if PRE_MC_1_19
clientApi.clientChunkLoadEvent(new ChunkWrapper(event.getChunk(), event.getWorld()), WorldWrapper.getWorldWrapper(event.getWorld()));
#else
clientApi.clientChunkLoadEvent(new ChunkWrapper(event.getChunk(), event.getLevel()), WorldWrapper.getWorldWrapper(event.getLevel()));
@@ -78,7 +78,7 @@ public class ForgeClientProxy
}
@SubscribeEvent
#if PRE_MC_1_19_1
#if PRE_MC_1_19
public void worldSaveEvent(WorldEvent.Save event)
#else
public void worldSaveEvent(LevelEvent.Save event)
@@ -89,14 +89,14 @@ public class ForgeClientProxy
/** This is also called when a new dimension loads */
@SubscribeEvent
#if PRE_MC_1_19_1
#if PRE_MC_1_19
public void worldLoadEvent(WorldEvent.Load event)
#else
public void worldLoadEvent(LevelEvent.Load event)
#endif
{
if (Minecraft.getInstance().screen instanceof TitleScreen) return;
#if PRE_MC_1_19_1
#if PRE_MC_1_19
if (event.getWorld() != null) {
eventApi.worldLoadEvent(WorldWrapper.getWorldWrapper(event.getWorld()));
}
@@ -108,7 +108,7 @@ public class ForgeClientProxy
}
@SubscribeEvent
#if PRE_MC_1_19_1
#if PRE_MC_1_19
public void worldUnloadEvent(WorldEvent.Unload event)
{
eventApi.worldUnloadEvent(WorldWrapper.getWorldWrapper(event.getWorld()));
@@ -130,7 +130,7 @@ public class ForgeClientProxy
event.getClass() == BlockEvent.FluidPlaceBlockEvent.class ||
event.getClass() == BlockEvent.PortalSpawnEvent.class)
{
#if PRE_MC_1_19_1
#if PRE_MC_1_19
IChunkWrapper chunk = new ChunkWrapper(event.getWorld().getChunk(event.getPos()), event.getWorld());
DimensionTypeWrapper dimType = DimensionTypeWrapper.getDimensionTypeWrapper(event.getWorld().dimensionType());
#else
@@ -144,7 +144,7 @@ public class ForgeClientProxy
}
@SubscribeEvent
public void onKeyInput(#if PRE_MC_1_19_1 InputEvent.KeyInputEvent event #else InputEvent.Key event #endif)
public void onKeyInput(#if PRE_MC_1_19 InputEvent.KeyInputEvent event #else InputEvent.Key event #endif)
{
if (Minecraft.getInstance().player == null) return;
if (event.getAction() != GLFW.GLFW_PRESS) return;
@@ -49,14 +49,14 @@ import net.minecraftforge.fml.loading.FMLLoader;
import net.minecraftforge.fml.ExtensionPoint;
#elif MC_1_17_1
import net.minecraftforge.fmlclient.ConfigGuiHandler;
#elif POST_MC_1_19_1
#elif POST_MC_1_19
import net.minecraftforge.client.ConfigScreenHandler;
#else // 1.18+ untill 1.19
import net.minecraftforge.client.ConfigGuiHandler;
#endif
// these imports change due to forge refactoring classes in 1.19
#if POST_MC_1_19_1
#if POST_MC_1_19
import net.minecraft.util.RandomSource;
import net.minecraft.client.renderer.RenderType;
import net.minecraftforge.client.model.data.ModelData;
@@ -109,7 +109,7 @@ public class ForgeMain implements LodForgeMethodCaller
#if PRE_MC_1_17_1
ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.CONFIGGUIFACTORY,
() -> (client, parent) -> ConfigGui.getScreen(parent, ""));
#elif POST_MC_1_19_1
#elif POST_MC_1_19
ModLoadingContext.get().registerExtensionPoint(ConfigScreenHandler.ConfigScreenFactory.class,
() -> new ConfigScreenHandler.ConfigScreenFactory((client, parent) -> ConfigGui.getScreen(parent, "")));
#else
@@ -120,21 +120,21 @@ public class ForgeMain implements LodForgeMethodCaller
MinecraftForge.EVENT_BUS.register(forgeClientProxy);
}
#if PRE_MC_1_19_1
#if PRE_MC_1_19
private final ModelDataMap modelData = new ModelDataMap.Builder().build();
#else
private final ModelData modelData = ModelData.EMPTY;
#endif
@Override
#if PRE_MC_1_19_1
#if PRE_MC_1_19
public List<BakedQuad> getQuads(MinecraftClientWrapper mc, Block block, BlockState blockState, Direction direction, Random random) {
return mc.getModelManager().getBlockModelShaper().getBlockModel(block.defaultBlockState()).getQuads(blockState, direction, random, modelData);
}
#else
public List<BakedQuad> getQuads(MinecraftClientWrapper mc, Block block, BlockState blockState, Direction direction, RandomSource random)
{
return mc.getModelManager().getBlockModelShaper().getBlockModel(block.defaultBlockState()).getQuads(blockState, direction, random, modelData #if POST_MC_1_19_1, RenderType.solid() #endif);
return mc.getModelManager().getBlockModelShaper().getBlockModel(block.defaultBlockState()).getQuads(blockState, direction, random, modelData #if POST_MC_1_19, RenderType.solid() #endif);
}
#endif
@@ -54,7 +54,7 @@ public class MixinFogRenderer
method = "setupFog(Lnet/minecraft/client/Camera;Lnet/minecraft/client/renderer/FogRenderer$FogMode;FZF)V",
remap = // Remap messiness due to this being added by forge.
#if MC_1_16_5 true
#elif PRE_MC_1_19_1 false
#elif PRE_MC_1_19 false
#else true #endif
)
private static void disableSetupFog(Camera camera, FogMode fogMode, float f, boolean bl, float partTick, CallbackInfo callback)
@@ -27,7 +27,7 @@ import com.seibel.lod.core.wrapperInterfaces.config.ILodConfigWrapperSingleton;
import net.minecraft.client.gui.screens.OptionsScreen;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.network.chat.Component;
#if PRE_MC_1_19_1
#if PRE_MC_1_19
import net.minecraft.network.chat.TranslatableComponent;
#endif
import net.minecraft.resources.ResourceLocation;
@@ -69,7 +69,7 @@ public class MixinOptionsScreen extends Screen {
// For now it goes to the client option by default
(buttonWidget) -> Objects.requireNonNull(minecraft).setScreen(ConfigGui.getScreen(this, "client")),
// Add a title to the screen
#if PRE_MC_1_19_1
#if PRE_MC_1_19
new TranslatableComponent("text.autoconfig." + ModInfo.ID + ".title")));
#else
Component.translatable("text.autoconfig." + ModInfo.ID + ".title")));
+2 -2
View File
@@ -1,6 +1,6 @@
modLoader="javafml" #//mandatory
loaderVersion="[40,44)" # // mandatory. This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
loaderVersion="[36,42)" # // mandatory. This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
license="GNU GPLv3"
issueTrackerURL="${issues}"
@@ -15,7 +15,7 @@ issueTrackerURL="${issues}"
description= "${description}" #//mandatory. The description text for the mod
logoFile="logo.png"
catalogueImageIcon="icon.png"
credits="Leonardo, Cola, Ran, coolGi, and Leetom. Without their hard work, Distant Horizons wouldn't be the mod it is today."
credits="Leonardo, Cola, Ran, CoolGi, and Leetom. Without their hard work, Distant Horizons wouldn't be the mod it is today."
#// if not set defaults to "false"
clientSideOnly="true"
#// if not set defaults to "BOTH"
+3 -3
View File
@@ -5,7 +5,7 @@ maven_group=com.seibel.lod
archives_base_name=DistantHorizons
# Mod info
mod_version=1.6.9a
mod_version=1.6.7a
mod_name=Distant Horizons
mod_description=This mod generates and renders simplified terrain beyond the normal view distance at a low performance cost. Allowing you to see much farther without turning your game into a slideshow.
mod_authors=["James Seibel", "Leonardo Amato", "Cola", "coolGi", "Ran", "Leetom"]
@@ -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
##### FOR IDE SUPPORT AND TELL IDE TO USE CERTIAN MC VERSION: SWITCH THIS:
mcVer=1.19.2
mcVer=1.19