Fixed debugging Dedicated server in Forge Dev workspace.

This commit is contained in:
Lex Manos 2015-02-06 21:35:11 -08:00
parent c80e75de9b
commit 7ed7da159e

View file

@ -42,11 +42,13 @@ import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.relauncher.Side;
import com.google.common.base.Function;
import com.google.common.primitives.Ints;
@Mod(modid = ModelLoaderRegistryDebug.MODID, version = ModelLoaderRegistryDebug.VERSION)
public class ModelLoaderRegistryDebug
{
public static final String MODID = "ForgeDebugModelLoaderRegistry";
@ -54,10 +56,16 @@ public class ModelLoaderRegistryDebug
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
GameRegistry.registerBlock(CustomModelBlock.instance, CustomModelBlock.name);
if (event.getSide() == Side.CLIENT)
clientPreInit();
}
private void clientPreInit()
{
//ModelLoaderRegistry.registerLoader(DummyModelLoader.instance);
B3DLoader.instance.addDomain(MODID.toLowerCase());
GameRegistry.registerBlock(CustomModelBlock.instance, CustomModelBlock.name);
//ModelBakery.addVariantName(Item.getItemFromBlock(CustomModelBlock.instance), "forgedebug:dummymodel");
String modelLocation = MODID.toLowerCase() + ":untitled2.b3d";
ModelBakery.addVariantName(Item.getItemFromBlock(CustomModelBlock.instance), modelLocation);