Skip to content

Commit

Permalink
fix: guard ext_render_distance_v1 behind enabled checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ishland committed Apr 22, 2024
1 parent 23f108b commit ea2569c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

public class ModuleEntryPoint {

private static final boolean enabled = new ConfigSystem.ConfigAccessor()
public static final boolean enabled = new ConfigSystem.ConfigAccessor()
.key("clientSideConfig.modifyMaxVDConfig.enabled")
.comment("Whether to modify maximum view distance")
.incompatibleMod("bobby", "*")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package com.ishland.c2me.client.uncapvd.common;

import com.ishland.c2me.base.common.config.ModStatuses;
import com.ishland.c2me.client.uncapvd.ModuleEntryPoint;
import net.fabricmc.api.ClientModInitializer;

public class UncapVDInitializer implements ClientModInitializer {

@Override
public void onInitializeClient() {
if (ModStatuses.fabric_networking_api_v1) {
if (ModuleEntryPoint.enabled && ModStatuses.fabric_networking_api_v1) {
ClientExtNetworking.registerListeners();
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package com.ishland.c2me.notickvd.common;

import com.ishland.c2me.base.common.config.ModStatuses;
import com.ishland.c2me.notickvd.ModuleEntryPoint;
import net.fabricmc.api.ModInitializer;

public class NoTickVDInitializer implements ModInitializer {
@Override
public void onInitialize() {
if (Config.enableExtRenderDistanceProtocol && ModStatuses.fabric_networking_api_v1) {
if (ModuleEntryPoint.enabled && Config.enableExtRenderDistanceProtocol && ModStatuses.fabric_networking_api_v1) {
ServerExtNetworking.registerListeners();
}
}
Expand Down

0 comments on commit ea2569c

Please sign in to comment.