Jump to content

Crash with keybindings.

Recommended Posts


Main Class(RealmOfTheDragons.java)

    public void Initialization(FMLInitializationEvent event) {
        GameRegistry.registerWorldGenerator(new RealmOfTheDragonsWorldGenerator(), 0);
        NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler());



	public void render() {}


package com.TheRPGAdventurer.ROTD.client.initialization;

import org.lwjgl.input.Keyboard;

import net.minecraft.client.settings.KeyBinding;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

public class ModKeys {
    public static final String KEY_CATEGORY = "key.categories.gameplay";
    public static  KeyBinding KEY_BREATH;
    public static void init() {
    	KEY_BREATH = new KeyBinding("key.dragon.breath", Keyboard.KEY_R, KEY_CATEGORY);

	public void render() {ModKeys.init();}





Link to comment
Share on other sites

You're trying to load a class that contains CLIENT only code on SERVER which is why you're getting this crash. I think annotating your ModKeys class with SideOnly should fix it but make sure to not access that class from anywhere else except your ClientProxy

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.