Skip to content

Commit

Permalink
Client Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiYueCommentary committed Nov 16, 2024
1 parent 580caa0 commit 72d527f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions forge/src/main/java/ziyue/tjmetro/forge/MainForge.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,17 @@ public MainForge() {
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> TianjinMetroClient::init);
MinecraftForge.EVENT_BUS.register(this);

DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () ->{
#if MC_VERSION <= "11605"
ModLoadingContext.get().registerExtensionPoint(net.minecraftforge.fml.ExtensionPoint.CONFIGGUIFACTORY, () -> (client, parent) -> new ConfigClientScreen(new Screen(parent)));
ModLoadingContext.get().registerExtensionPoint(net.minecraftforge.fml.ExtensionPoint.CONFIGGUIFACTORY, () -> (client, parent) -> new ConfigClientScreen(new Screen(parent)));
#elif MC_VERSION <= "11701"
ModLoadingContext.get().registerExtensionPoint(net.minecraftforge.fmlclient.ConfigGuiHandler.ConfigGuiFactory.class, () -> new net.minecraftforge.fmlclient.ConfigGuiHandler.ConfigGuiFactory((client, parent) -> new ConfigClientScreen(new Screen(parent))));
ModLoadingContext.get().registerExtensionPoint(net.minecraftforge.fmlclient.ConfigGuiHandler.ConfigGuiFactory.class, () -> new net.minecraftforge.fmlclient.ConfigGuiHandler.ConfigGuiFactory((client, parent) -> new ConfigClientScreen(new Screen(parent))));
#elif MC_VERSION <= "11802"
ModLoadingContext.get().registerExtensionPoint(net.minecraftforge.client.ConfigGuiHandler.ConfigGuiFactory.class, () -> new net.minecraftforge.client.ConfigGuiHandler.ConfigGuiFactory((client, parent) -> new ConfigClientScreen(new Screen(parent))));
ModLoadingContext.get().registerExtensionPoint(net.minecraftforge.client.ConfigGuiHandler.ConfigGuiFactory.class, () -> new net.minecraftforge.client.ConfigGuiHandler.ConfigGuiFactory((client, parent) -> new ConfigClientScreen(new Screen(parent))));
#elif MC_VERSION <= "12004"
ModLoadingContext.get().registerExtensionPoint(net.minecraftforge.client.ConfigScreenHandler.ConfigScreenFactory.class, () -> new net.minecraftforge.client.ConfigScreenHandler.ConfigScreenFactory((client, parent) -> new ConfigClientScreen(new Screen(parent))));
ModLoadingContext.get().registerExtensionPoint(net.minecraftforge.client.ConfigScreenHandler.ConfigScreenFactory.class, () -> new net.minecraftforge.client.ConfigScreenHandler.ConfigScreenFactory((client, parent) -> new ConfigClientScreen(new Screen(parent))));
#endif
});
}

@SubscribeEvent
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx4G
org.gradle.parallel=true
org.gradle.daemon=false

minecraft_version=1.20.4
minecraft_version=1.20.1

# Mod Properties
mod_version=1.0.0-beta-2-hotfix-2
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-8.10-bin.zip
distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-8.11-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down

0 comments on commit 72d527f

Please sign in to comment.