Skip to content

Commit bfdde42

Browse files
Bugfix
* Fixed a crash with dedicated servers
1 parent 930e962 commit bfdde42

4 files changed

Lines changed: 6 additions & 7 deletions

File tree

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ mod_name=Essentials
3434
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
3535
mod_license=MIT
3636
# The mod version. See https://semver.org/
37-
mod_version=2.17.2
37+
mod_version=2.17.3
3838
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
3939
# This should match the base package used for the mod sources.
4040
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html

src/main/java/com/Da_Technomancer/essentials/ESConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public class ESConfig{
2020
protected static void init(ModContainer modContainer){
2121
//Client config
2222
ModConfigSpec.Builder clientBuilder = new ModConfigSpec.Builder();
23-
addWrench = clientBuilder.worldRestart().comment("Should the Wrench show up in the creative menu?").define("creative_wrench", true);
2423
numberDisplay = clientBuilder.comment("How should very large and small numbers be displayed?", "Options are: NORMAL, SCIENTIFIC, ENGINEERING, and HEX").defineEnum("num_display", ConfigUtil.NumberTypes.SCIENTIFIC);
2524

2625
ModConfigSpec clientSpec = clientBuilder.build();
@@ -34,6 +33,7 @@ protected static void init(ModContainer modContainer){
3433
fertileSoilRate = serverBuilder.comment("Percent of normal speed Fertile Soil should work at", "Set to 0 to disable").defineInRange("fertile_rate", 100, 0, 100);
3534
maxRedstoneRange = serverBuilder.comment("Range of signals through Circuit Wire").defineInRange("redstone_range", 16, 1, 128);
3635
wirelessRange = serverBuilder.comment("Range of signals through Redstone Receivers/Transmitters").defineInRange("wireless_range", 32, 0, 128);
36+
addWrench = serverBuilder.comment("Should the Wrench show up in the creative menu?").define("creative_wrench", true);
3737

3838
ModConfigSpec serverSpec = serverBuilder.build();
3939
modContainer.registerConfig(ModConfig.Type.SERVER, serverSpec);

src/main/java/com/Da_Technomancer/essentials/ESEventHandlerServer.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
package com.Da_Technomancer.essentials;
22

3-
import net.neoforged.api.distmarker.Dist;
4-
import net.neoforged.fml.common.EventBusSubscriber;
5-
63
public class ESEventHandlerServer{
74

8-
@EventBusSubscriber(bus = EventBusSubscriber.Bus.MOD, modid = Essentials.MODID, value = Dist.DEDICATED_SERVER)
5+
// Keep commented until we need an event handler
6+
// @EventBusSubscriber(modid = Essentials.MODID, value = Dist.DEDICATED_SERVER)
97
public static class ESModEventsServer{
108

119
}

src/main/java/com/Da_Technomancer/essentials/Essentials.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ private void clientInit(@SuppressWarnings("unused") FMLClientSetupEvent e){
5151
}
5252

5353
private void serverInit(@SuppressWarnings("unused") FMLDedicatedServerSetupEvent e){
54-
NeoForge.EVENT_BUS.register(ESEventHandlerServer.class);
54+
// Keep commented until we need an event handler
55+
// NeoForge.EVENT_BUS.register(ESEventHandlerServer.class);
5556
}
5657
}

0 commit comments

Comments
 (0)