+7
-3
@@ -278,7 +278,7 @@ public class ClassicConfigGUI
|
||||
Objects.requireNonNull(minecraft).setScreen(parent);
|
||||
}));
|
||||
|
||||
this.list = new ConfigListWidget(this.minecraft, this.width * 2, this.height, 32, this.height - 32, 25);
|
||||
this.list = new ConfigListWidget(this.minecraft, this.width * 2, this.height, 32, this.height - 32);
|
||||
if (this.minecraft != null && this.minecraft.level != null)
|
||||
this.list.setRenderBackground(false);
|
||||
|
||||
@@ -537,9 +537,13 @@ public class ClassicConfigGUI
|
||||
{
|
||||
Font textRenderer;
|
||||
|
||||
public ConfigListWidget(Minecraft minecraftClient, int i, int j, int k, int l, int m)
|
||||
public ConfigListWidget(Minecraft minecraftClient, int i, int j, int k, int l)
|
||||
{
|
||||
super(minecraftClient, i, j, k, l, m);
|
||||
#if PRE_MC_1_20_4
|
||||
super(minecraftClient, i, j, k, l, 25);
|
||||
#else
|
||||
super(minecraftClient, i, j, k, l);
|
||||
#endif
|
||||
this.centerListVertically = false;
|
||||
textRenderer = minecraftClient.font;
|
||||
}
|
||||
|
||||
+10
-6
@@ -59,7 +59,7 @@ public class MinecraftScreen
|
||||
screen.scaledHeight = this.height;
|
||||
screen.init(); // Init our own config screen
|
||||
|
||||
this.list = new ConfigListWidget(this.minecraft, this.width, this.height, 0, this.height, 25); // Select the area to tint
|
||||
this.list = new ConfigListWidget(this.minecraft, this.width, this.height, 0, this.height); // Select the area to tint
|
||||
if (this.minecraft != null && this.minecraft.level != null) // Check if in game
|
||||
this.list.setRenderBackground(false); // Disable from rendering
|
||||
this.addWidget(this.list); // Add the tint to the things to be rendered
|
||||
@@ -72,10 +72,10 @@ public class MinecraftScreen
|
||||
public void render(GuiGraphics matrices, int mouseX, int mouseY, float delta)
|
||||
#endif
|
||||
{
|
||||
#if MC_1_20_2
|
||||
this.renderBackground(matrices, mouseX, mouseY, delta); // Render background
|
||||
#else
|
||||
#if PRE_MC_1_20_2
|
||||
this.renderBackground(matrices); // Render background
|
||||
#else
|
||||
this.renderBackground(matrices, mouseX, mouseY, delta); // Render background
|
||||
#endif
|
||||
this.list.render(matrices, mouseX, mouseY, delta); // Renders the items in the render list (currently only used to tint background darker)
|
||||
|
||||
@@ -131,9 +131,13 @@ public class MinecraftScreen
|
||||
|
||||
public static class ConfigListWidget extends ContainerObjectSelectionList
|
||||
{
|
||||
public ConfigListWidget(Minecraft minecraftClient, int i, int j, int k, int l, int m)
|
||||
public ConfigListWidget(Minecraft minecraftClient, int i, int j, int k, int l)
|
||||
{
|
||||
super(minecraftClient, i, j, k, l, m);
|
||||
#if PRE_MC_1_20_4
|
||||
super(minecraftClient, i, j, k, l, 25);
|
||||
#else
|
||||
super(minecraftClient, i, j, k, l);
|
||||
#endif
|
||||
this.centerListVertically = false;
|
||||
}
|
||||
|
||||
|
||||
+10
-6
@@ -134,7 +134,7 @@ public class ChangelogScreen extends DhScreen
|
||||
);
|
||||
|
||||
|
||||
this.changelogArea = new TextArea(this.minecraft, this.width * 2, this.height, 32, this.height - 32, 10);
|
||||
this.changelogArea = new TextArea(this.minecraft, this.width * 2, this.height, 32, this.height - 32);
|
||||
for (int i = 0; i < changelog.size(); i++)
|
||||
{
|
||||
this.changelogArea.addButton(TextOrLiteral(changelog.get(i)));
|
||||
@@ -150,10 +150,10 @@ public class ChangelogScreen extends DhScreen
|
||||
public void render(GuiGraphics matrices, int mouseX, int mouseY, float delta)
|
||||
#endif
|
||||
{
|
||||
#if MC_1_20_2
|
||||
this.renderBackground(matrices, mouseX, mouseY, delta); // Render background
|
||||
#else
|
||||
#if PRE_MC_1_20_2
|
||||
this.renderBackground(matrices); // Render background
|
||||
#else
|
||||
this.renderBackground(matrices, mouseX, mouseY, delta); // Render background
|
||||
#endif
|
||||
if (!usable)
|
||||
return;
|
||||
@@ -185,9 +185,13 @@ public class ChangelogScreen extends DhScreen
|
||||
{
|
||||
Font textRenderer;
|
||||
|
||||
public TextArea(Minecraft minecraftClient, int i, int j, int k, int l, int m)
|
||||
public TextArea(Minecraft minecraftClient, int i, int j, int k, int l)
|
||||
{
|
||||
super(minecraftClient, i, j, k, l, m);
|
||||
#if PRE_MC_1_20_4
|
||||
super(minecraftClient, i, j, k, l, 10);
|
||||
#else
|
||||
super(minecraftClient, i, j, k, l);
|
||||
#endif
|
||||
this.centerListVertically = false;
|
||||
textRenderer = minecraftClient.font;
|
||||
}
|
||||
|
||||
+3
-3
@@ -152,10 +152,10 @@ public class UpdateModScreen extends DhScreen
|
||||
public void render(GuiGraphics matrices, int mouseX, int mouseY, float delta)
|
||||
#endif
|
||||
{
|
||||
#if MC_1_20_2
|
||||
this.renderBackground(matrices, mouseX, mouseY, delta); // Render background
|
||||
#else
|
||||
#if PRE_MC_1_20_2
|
||||
this.renderBackground(matrices); // Render background
|
||||
#else
|
||||
this.renderBackground(matrices, mouseX, mouseY, delta); // Render background
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
+4
@@ -282,7 +282,11 @@ public class MinecraftClientWrapper implements IMinecraftClientWrapper, IMinecra
|
||||
{
|
||||
LOGGER.error(ModInfo.READABLE_NAME + " had the following error: [" + errorMessage + "]. Crashing Minecraft...", exception);
|
||||
CrashReport report = new CrashReport(errorMessage, exception);
|
||||
#if PRE_MC_1_20_4
|
||||
Minecraft.crash(report);
|
||||
#else
|
||||
Minecraft.getInstance().delayCrash(report);
|
||||
#endif
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+11
-11
@@ -44,7 +44,7 @@ import com.mojang.math.Vector3f;
|
||||
#else
|
||||
import org.joml.Vector3f;
|
||||
#endif
|
||||
#if MC_1_20_2
|
||||
#if POST_MC_1_20_2
|
||||
import net.minecraft.client.renderer.chunk.SectionRenderDispatcher;
|
||||
#endif
|
||||
|
||||
@@ -321,16 +321,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper
|
||||
{
|
||||
try
|
||||
{
|
||||
#if MC_1_20_2
|
||||
LevelRenderer levelRenderer = MC.levelRenderer;
|
||||
Collection<SectionRenderDispatcher.RenderSection> chunks = levelRenderer.visibleSections;
|
||||
|
||||
return (chunks.stream().map((chunk) -> {
|
||||
AABB chunkBoundingBox = chunk.getBoundingBox();
|
||||
return new DhChunkPos(Math.floorDiv((int) chunkBoundingBox.minX, 16),
|
||||
Math.floorDiv((int) chunkBoundingBox.minZ, 16));
|
||||
}).collect(Collectors.toCollection(HashSet::new)));
|
||||
#else
|
||||
#if PRE_MC_1_20_2
|
||||
LevelRenderer levelRenderer = MC.levelRenderer;
|
||||
Collection<LevelRenderer.RenderChunkInfo> chunks =
|
||||
#if PRE_MC_1_18_2 levelRenderer.renderChunks;
|
||||
@@ -343,6 +334,15 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper
|
||||
return new DhChunkPos(Math.floorDiv((int) chunkBoundingBox.minX, 16),
|
||||
Math.floorDiv((int) chunkBoundingBox.minZ, 16));
|
||||
}).collect(Collectors.toCollection(HashSet::new)));
|
||||
#else
|
||||
LevelRenderer levelRenderer = MC.levelRenderer;
|
||||
Collection<SectionRenderDispatcher.RenderSection> chunks = levelRenderer.visibleSections;
|
||||
|
||||
return (chunks.stream().map((chunk) -> {
|
||||
AABB chunkBoundingBox = chunk.getBoundingBox();
|
||||
return new DhChunkPos(Math.floorDiv((int) chunkBoundingBox.minX, 16),
|
||||
Math.floorDiv((int) chunkBoundingBox.minZ, 16));
|
||||
}).collect(Collectors.toCollection(HashSet::new)));
|
||||
#endif
|
||||
}
|
||||
catch (LinkageError e)
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.seibel.distanthorizons.fabric.wrappers.modAccessor;
|
||||
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.IBCLibAccessor;
|
||||
#if MC_1_16_5 || MC_1_17_1
|
||||
#if MC_1_16_5 || MC_1_17_1 || MC_1_20_4 // These versions either don't have BCLib, or the implementation is different
|
||||
#elif MC_1_18_2
|
||||
import ru.bclib.config.ClientConfig;
|
||||
import ru.bclib.config.Configs;
|
||||
@@ -17,7 +17,7 @@ public class BCLibAccessor implements IBCLibAccessor
|
||||
|
||||
public void setRenderCustomFog(boolean newValue)
|
||||
{
|
||||
#if !(MC_1_16_5 || MC_1_17_1) // 1.16 and 1.17 don't have "ClientConfig.CUSTOM_FOG_RENDERING"
|
||||
#if !(MC_1_16_5 || MC_1_17_1 || MC_1_20_4) // These versions either don't have BCLib, or the implementation is different
|
||||
|
||||
// Change the value of CUSTOM_FOG_RENDERING in the bclib client config
|
||||
// This disabled fog from rendering within bclib
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
# 1.20.4 version
|
||||
java_version=17
|
||||
minecraft_version=1.20.4
|
||||
parchment_version=1.20.1:2023.09.03
|
||||
compatible_minecraft_versions=["1.20.4", "1.20.3"]
|
||||
accessWidenerVersion=1_20_2
|
||||
builds_for=fabric,forge
|
||||
|
||||
# Fabric loader
|
||||
fabric_loader_version=0.15.1
|
||||
fabric_api_version=0.91.2+1.20.4
|
||||
# Fabric mod versions
|
||||
modmenu_version=9.0.0-pre.1
|
||||
starlight_version_fabric=
|
||||
phosphor_version_fabric=
|
||||
lithium_version=
|
||||
sodium_version=mc1.20.3-0.5.4
|
||||
iris_version=1.6.13+1.20.4
|
||||
bclib_version=
|
||||
immersive_portals_version=
|
||||
canvas_version=
|
||||
|
||||
fabric_incompatibility_list={ }
|
||||
fabric_recommend_list={ "indium": "*" }
|
||||
|
||||
# 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=1
|
||||
enable_bclib=0
|
||||
enable_immersive_portals=0
|
||||
enable_canvas=0
|
||||
|
||||
# Forge loader
|
||||
forge_version=49.0.3
|
||||
# Forge mod versions
|
||||
starlight_version_forge=
|
||||
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
|
||||
enable_terrafirmacraft=0
|
||||
Reference in New Issue
Block a user