mirror of
https://github.com/KAMKEEL/CustomNPC-Gecko-Addon.git
synced 2026-11-20 02:59:43 +00:00
Added the entries required to register the tile and the renderer to the client and common proxy
This commit is contained in:
1 parent
b5736ed74f
commit
789b1ee13c
2 files changed
+8
No files matched your search
@@ -4,10 +4,13 @@ import com.goodbird.npcgecko.api.AbstractGeckoAPI;
|
||||
import com.goodbird.npcgecko.entity.EntityCustomModel;
|
||||
import com.goodbird.npcgecko.handler.EventHandler;
|
||||
import com.goodbird.npcgecko.network.NetworkHandler;
|
||||
import com.goodbird.npcgecko.tile.TileEntityCustomModel;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import software.bernie.example.block.tile.BotariumTileEntity;
|
||||
|
||||
public class CommonProxy {
|
||||
|
||||
@@ -18,6 +21,7 @@ public class CommonProxy {
|
||||
|
||||
public void init(FMLInitializationEvent ev){
|
||||
NetworkHandler.init();
|
||||
GameRegistry.registerTileEntity(TileEntityCustomModel.class, "custommodeltile");
|
||||
NpcAPI.Instance().addGlobalObject("GeckoAPI", AbstractGeckoAPI.Instance());
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,10 @@ package com.goodbird.npcgecko.client;
|
||||
|
||||
import com.goodbird.npcgecko.CommonProxy;
|
||||
import com.goodbird.npcgecko.client.renderer.RenderCustomModel;
|
||||
import com.goodbird.npcgecko.client.renderer.RenderTileCustomModel;
|
||||
import com.goodbird.npcgecko.entity.EntityCustomModel;
|
||||
import com.goodbird.npcgecko.tile.TileEntityCustomModel;
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
|
||||
@@ -13,6 +16,7 @@ public class ClientProxy extends CommonProxy {
|
||||
public void preInit(FMLPreInitializationEvent ev) {
|
||||
super.preInit(ev);
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityCustomModel.class, new RenderCustomModel());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCustomModel.class, new RenderTileCustomModel());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user