Fix up the referencing of client side code on the server (server wouldn't start because the client config was referencing Keybinding which is client side only)
This commit is contained in:
parent
af8621f480
commit
4fb4480cd8
|
@ -1,4 +1,4 @@
|
|||
package com.pahimar.ee3.configuration;
|
||||
package com.pahimar.ee3.client.configuration;
|
||||
|
||||
import com.pahimar.ee3.client.settings.Keybindings;
|
||||
import com.pahimar.ee3.reference.Names;
|
||||
|
@ -15,7 +15,7 @@ public class ClientConfiguration
|
|||
private static final String CATEGORY_KEYBIND = "keybindings";
|
||||
private static Configuration configuration;
|
||||
|
||||
protected static void init(File configFile)
|
||||
public static void init(File configFile)
|
||||
{
|
||||
configuration = new Configuration(configFile);
|
||||
|
|
@ -1,11 +1,13 @@
|
|||
package com.pahimar.ee3.configuration;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class ConfigurationHandler
|
||||
{
|
||||
public static void init(String configPath)
|
||||
{
|
||||
ClientConfiguration.init(new File(configPath + "client.properties"));
|
||||
EquivalentExchange3.proxy.initClientConfiguration(new File(configPath + "client.properties"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.pahimar.ee3.proxy;
|
||||
|
||||
import com.pahimar.ee3.client.configuration.ClientConfiguration;
|
||||
import com.pahimar.ee3.client.handler.ItemTooltipEventHandler;
|
||||
import com.pahimar.ee3.client.handler.KeyInputEventHandler;
|
||||
import com.pahimar.ee3.client.renderer.item.*;
|
||||
|
@ -15,6 +16,8 @@ import net.minecraft.item.Item;
|
|||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class ClientProxy extends CommonProxy
|
||||
{
|
||||
@Override
|
||||
|
@ -34,6 +37,12 @@ public class ClientProxy extends CommonProxy
|
|||
ClientRegistry.registerKeyBinding(Keybindings.toggle);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initClientConfiguration(File configFile)
|
||||
{
|
||||
ClientConfiguration.init(configFile);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initRenderingAndTextures()
|
||||
{
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.pahimar.ee3.proxy;
|
||||
|
||||
import com.pahimar.ee3.handler.ItemEventHandler;
|
||||
import com.pahimar.ee3.handler.PlayerEventHandler;
|
||||
import com.pahimar.ee3.handler.WorldEventHandler;
|
||||
import com.pahimar.ee3.reference.Names;
|
||||
import com.pahimar.ee3.tileentity.*;
|
||||
|
@ -17,6 +18,7 @@ public abstract class CommonProxy implements IProxy
|
|||
FMLCommonHandler.instance().bus().register(itemEventHandler);
|
||||
MinecraftForge.EVENT_BUS.register(itemEventHandler);
|
||||
MinecraftForge.EVENT_BUS.register(new WorldEventHandler());
|
||||
MinecraftForge.EVENT_BUS.register(new PlayerEventHandler());
|
||||
}
|
||||
|
||||
public void registerTileEntities()
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
package com.pahimar.ee3.proxy;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public interface IProxy
|
||||
{
|
||||
public abstract void initClientConfiguration(File configFile);
|
||||
|
||||
public abstract void registerTileEntities();
|
||||
|
||||
public abstract void initRenderingAndTextures();
|
||||
|
|
|
@ -1,7 +1,15 @@
|
|||
package com.pahimar.ee3.proxy;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class ServerProxy extends CommonProxy
|
||||
{
|
||||
@Override
|
||||
public void initClientConfiguration(File configFile)
|
||||
{
|
||||
// NOOP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initRenderingAndTextures()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue