blob: 3a0f2f9739d0eeb1f6d4c95941a5c06ad36d998b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
package gmail.Lance5057.proxy;
import gmail.Lance5057.blocks.Renderer_CrestMount;
import gmail.Lance5057.blocks.TileEntity_CrestMount;
import gmail.Lance5057.gui.Container_CrestMount;
import gmail.Lance5057.gui.Gui_CrestMount;
import gmail.Lance5057.items.ModelTinkerArmor;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.ClientRegistry;
public class ClientProxy extends CommonProxy {
private static final ModelTinkerArmor tutChest = new ModelTinkerArmor(1.0f);
@Override
public void registerRenderers() {
// This is for rendering entities and so forth later on
ClientRegistry.bindTileEntitySpecialRenderer(TileEntity_CrestMount.class, new Renderer_CrestMount());
}
@Override
public World getClientWorld()
{
return FMLClientHandler.instance().getClient().theWorld;
}
public void registerTileEntitySpecialRenderer()
{
}
@Override
public ModelBiped getArmorModel(int id)
{
switch (id)
{
case 0: return tutChest;
default: break;
}
return tutChest; //default, if whenever you should have passed on a wrong id
}
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
TileEntity te = world.getTileEntity(x, y, z);
if (te != null && te instanceof TileEntity_CrestMount)
{
return new Gui_CrestMount((Container_CrestMount) new Container_CrestMount(player.inventory, new TileEntity_CrestMount()));
}
else
{
return null;
}
}
}
|