Cleanup proxy

This commit is contained in:
Nick 2016-01-09 22:05:03 -08:00
parent 254d9bec80
commit a907edca48
3 changed files with 5 additions and 11 deletions

View file

@ -1,12 +1,9 @@
package WayofTime.bloodmagic.proxy;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.client.model.obj.OBJLoader;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.client.registry.RenderingRegistry;
import net.minecraftforge.fml.common.FMLCommonHandler;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.client.render.RenderAlchemyArray;
import WayofTime.bloodmagic.client.render.RenderAltar;
@ -35,17 +32,15 @@ public class ClientProxy extends CommonProxy
public void preInit()
{
super.preInit();
Object obj = new ClientEventHandler();
MinecraftForge.EVENT_BUS.register(obj);
FMLCommonHandler.instance().bus().register(obj);
MinecraftForge.EVENT_BUS.register(new ClientEventHandler());
renderHelper = new InventoryRenderHelper(Constants.Mod.DOMAIN);
OBJLoader.instance.addDomain(Constants.Mod.MODID);
ModBlocks.initRenders();
ModItems.initRenders();
OBJLoader.instance.addDomain(Constants.Mod.MODID);
ModelLoader.setCustomModelResourceLocation(InventoryRenderHelper.getItemFromBlock(ModBlocks.altar), 0, new ModelResourceLocation(Constants.Mod.DOMAIN + "BlockAltar", "inventory"));
ClientRegistry.bindTileEntitySpecialRenderer(TileAlchemyArray.class, new RenderAlchemyArray());
ClientRegistry.bindTileEntitySpecialRenderer(TileAltar.class, new RenderAltar());
}

View file

@ -14,9 +14,7 @@ public class CommonProxy
public void preInit()
{
Object obj = new EventHandler();
MinecraftForge.EVENT_BUS.register(obj);
FMLCommonHandler.instance().bus().register(obj);
MinecraftForge.EVENT_BUS.register(new EventHandler());
registerRenderers();
}

View file

@ -78,6 +78,7 @@ public class ModBlocks
renderHelper.itemRender(InventoryRenderHelper.getItemFromBlock(bloodRune), i);
}
renderHelper.itemRender(InventoryRenderHelper.getItemFromBlock(altar));
renderHelper.itemRender(InventoryRenderHelper.getItemFromBlock(ritualController), 0);
renderHelper.itemRender(InventoryRenderHelper.getItemFromBlock(ritualController), 1);
renderHelper.itemRender(InventoryRenderHelper.getItemFromBlock(ritualStone), 0);