Fix a server crash in OTEMod

This commit is contained in:
zontreck 2023-12-16 15:59:42 -07:00
parent f4d8b9761f
commit 750bc86550
3 changed files with 6 additions and 3 deletions

View file

@ -49,7 +49,7 @@ mod_name=OTEMod
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=GPLv3
# The mod version. See https://semver.org/
mod_version=1.4.121623.1529
mod_version=1.4.121623.1553
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html

View file

@ -111,13 +111,12 @@ public class OTEMod
ModMenuTypes.CONTAINERS.register(bus);
ModBlocks.register(bus);
ModItems.register(bus);
CreativeModeTabs.REGISTER.register(bus);
ModItems.register(bus);
ModEntities.register(bus);
ModEnchantments.register(bus);
ModEntityTypes.register(bus);
MinecraftForge.EVENT_BUS.register(new KeyBindings());
//MenuInitializer.register(bus);
}
@ -236,6 +235,7 @@ public class OTEMod
// Some client setup code
//LOGGER.info("HELLO FROM CLIENT SETUP");
//LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName());
MinecraftForge.EVENT_BUS.register(new KeyBindings());
MenuScreens.register(ModMenuTypes.VAULT.get(), VaultScreen::new);
MenuScreens.register(ModMenuTypes.SCRUBBER.get(), ItemScrubberScreen::new);

View file

@ -5,9 +5,12 @@ import com.mojang.blaze3d.platform.InputConstants;
import net.minecraft.client.KeyMapping;
import net.minecraft.client.multiplayer.ClientRegistryLayer;
import net.minecraft.core.registries.Registries;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.client.event.RegisterKeyMappingsEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
@OnlyIn(Dist.CLIENT)
public class KeyBindings {
public static final String KEY_CATEGORY_OTEMOD = "key.category.otemod";
public static final String KEY_OPEN_VAULT = "key.otemod.open_vault";