Fixed debugging Dedicated server in Forge Dev workspace.
This commit is contained in:
parent
c80e75de9b
commit
7ed7da159e
1 changed files with 9 additions and 1 deletions
|
@ -42,11 +42,13 @@ import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||||
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
|
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
import com.google.common.primitives.Ints;
|
import com.google.common.primitives.Ints;
|
||||||
|
|
||||||
@Mod(modid = ModelLoaderRegistryDebug.MODID, version = ModelLoaderRegistryDebug.VERSION)
|
@Mod(modid = ModelLoaderRegistryDebug.MODID, version = ModelLoaderRegistryDebug.VERSION)
|
||||||
|
|
||||||
public class ModelLoaderRegistryDebug
|
public class ModelLoaderRegistryDebug
|
||||||
{
|
{
|
||||||
public static final String MODID = "ForgeDebugModelLoaderRegistry";
|
public static final String MODID = "ForgeDebugModelLoaderRegistry";
|
||||||
|
@ -54,10 +56,16 @@ public class ModelLoaderRegistryDebug
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void preInit(FMLPreInitializationEvent event)
|
public void preInit(FMLPreInitializationEvent event)
|
||||||
|
{
|
||||||
|
GameRegistry.registerBlock(CustomModelBlock.instance, CustomModelBlock.name);
|
||||||
|
if (event.getSide() == Side.CLIENT)
|
||||||
|
clientPreInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void clientPreInit()
|
||||||
{
|
{
|
||||||
//ModelLoaderRegistry.registerLoader(DummyModelLoader.instance);
|
//ModelLoaderRegistry.registerLoader(DummyModelLoader.instance);
|
||||||
B3DLoader.instance.addDomain(MODID.toLowerCase());
|
B3DLoader.instance.addDomain(MODID.toLowerCase());
|
||||||
GameRegistry.registerBlock(CustomModelBlock.instance, CustomModelBlock.name);
|
|
||||||
//ModelBakery.addVariantName(Item.getItemFromBlock(CustomModelBlock.instance), "forgedebug:dummymodel");
|
//ModelBakery.addVariantName(Item.getItemFromBlock(CustomModelBlock.instance), "forgedebug:dummymodel");
|
||||||
String modelLocation = MODID.toLowerCase() + ":untitled2.b3d";
|
String modelLocation = MODID.toLowerCase() + ":untitled2.b3d";
|
||||||
ModelBakery.addVariantName(Item.getItemFromBlock(CustomModelBlock.instance), modelLocation);
|
ModelBakery.addVariantName(Item.getItemFromBlock(CustomModelBlock.instance), modelLocation);
|
||||||
|
|
Loading…
Reference in a new issue