2012-11-25 16:45:00 +01:00
|
|
|
package mekanism.generators.client;
|
|
|
|
|
2014-01-03 03:09:21 +01:00
|
|
|
import cpw.mods.fml.client.registry.ClientRegistry;
|
|
|
|
import cpw.mods.fml.client.registry.RenderingRegistry;
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
|
|
import mekanism.generators.client.gui.*;
|
|
|
|
import mekanism.generators.client.render.*;
|
2012-12-20 22:53:39 +01:00
|
|
|
import mekanism.generators.common.GeneratorsCommonProxy;
|
2014-01-03 03:09:21 +01:00
|
|
|
import mekanism.generators.common.tileentity.*;
|
2012-12-20 22:53:39 +01:00
|
|
|
import net.minecraft.client.gui.GuiScreen;
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
import net.minecraft.tileentity.TileEntity;
|
|
|
|
import net.minecraft.world.World;
|
2012-11-25 16:45:00 +01:00
|
|
|
|
2013-04-13 16:33:37 +02:00
|
|
|
@SideOnly(Side.CLIENT)
|
2012-11-25 16:45:00 +01:00
|
|
|
public class GeneratorsClientProxy extends GeneratorsCommonProxy
|
|
|
|
{
|
2013-05-14 17:34:26 +02:00
|
|
|
public static int GENERATOR_RENDER_ID = RenderingRegistry.getNextAvailableRenderId();
|
2012-11-25 16:45:00 +01:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void registerSpecialTileEntities()
|
|
|
|
{
|
2013-04-13 02:25:21 +02:00
|
|
|
ClientRegistry.registerTileEntity(TileEntityAdvancedSolarGenerator.class, "AdvancedSolarGenerator", new RenderAdvancedSolarGenerator());
|
2013-11-02 17:00:29 +01:00
|
|
|
ClientRegistry.registerTileEntity(TileEntitySolarGenerator.class, "SolarGenerator", new RenderSolarGenerator());
|
2012-11-25 16:45:00 +01:00
|
|
|
ClientRegistry.registerTileEntity(TileEntityBioGenerator.class, "BioGenerator", new RenderBioGenerator());
|
2012-12-19 21:23:55 +01:00
|
|
|
ClientRegistry.registerTileEntity(TileEntityHeatGenerator.class, "HeatGenerator", new RenderHeatGenerator());
|
|
|
|
ClientRegistry.registerTileEntity(TileEntityHydrogenGenerator.class, "HydrogenGenerator", new RenderHydrogenGenerator());
|
2013-04-28 21:23:08 +02:00
|
|
|
ClientRegistry.registerTileEntity(TileEntityWindTurbine.class, "WindTurbine", new RenderWindTurbine());
|
2012-11-25 16:45:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void registerRenderInformation()
|
|
|
|
{
|
|
|
|
//Register block handler
|
2012-11-27 01:18:50 +01:00
|
|
|
RenderingRegistry.registerBlockHandler(new BlockRenderingHandler());
|
2012-11-25 16:45:00 +01:00
|
|
|
|
2012-11-28 16:33:34 +01:00
|
|
|
System.out.println("[MekanismGenerators] Render registrations complete.");
|
2012-11-25 16:45:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public GuiScreen getClientGui(int ID, EntityPlayer player, World world, int x, int y, int z)
|
|
|
|
{
|
|
|
|
TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
|
|
|
|
|
|
|
|
switch(ID)
|
|
|
|
{
|
|
|
|
case 0:
|
|
|
|
return new GuiHeatGenerator(player.inventory, (TileEntityHeatGenerator)tileEntity);
|
|
|
|
case 1:
|
|
|
|
return new GuiSolarGenerator(player.inventory, (TileEntitySolarGenerator)tileEntity);
|
|
|
|
case 3:
|
|
|
|
return new GuiHydrogenGenerator(player.inventory, (TileEntityHydrogenGenerator)tileEntity);
|
|
|
|
case 4:
|
|
|
|
return new GuiBioGenerator(player.inventory, (TileEntityBioGenerator)tileEntity);
|
2013-04-28 21:23:08 +02:00
|
|
|
case 5:
|
|
|
|
return new GuiWindTurbine(player.inventory, (TileEntityWindTurbine)tileEntity);
|
2012-11-25 16:45:00 +01:00
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|