2012-11-25 16:45:00 +01:00
|
|
|
package mekanism.generators.client;
|
|
|
|
|
2013-08-27 00:49:32 +02:00
|
|
|
import mekanism.generators.client.gui.GuiBioGenerator;
|
|
|
|
import mekanism.generators.client.gui.GuiElectrolyticSeparator;
|
|
|
|
import mekanism.generators.client.gui.GuiHeatGenerator;
|
|
|
|
import mekanism.generators.client.gui.GuiHydrogenGenerator;
|
|
|
|
import mekanism.generators.client.gui.GuiSolarGenerator;
|
|
|
|
import mekanism.generators.client.gui.GuiWindTurbine;
|
|
|
|
import mekanism.generators.client.render.RenderAdvancedSolarGenerator;
|
|
|
|
import mekanism.generators.client.render.RenderBioGenerator;
|
|
|
|
import mekanism.generators.client.render.RenderElectrolyticSeparator;
|
|
|
|
import mekanism.generators.client.render.RenderHeatGenerator;
|
|
|
|
import mekanism.generators.client.render.RenderHydrogenGenerator;
|
2013-11-02 17:00:29 +01:00
|
|
|
import mekanism.generators.client.render.RenderSolarGenerator;
|
2013-08-27 00:49:32 +02:00
|
|
|
import mekanism.generators.client.render.RenderWindTurbine;
|
2012-12-20 22:53:39 +01:00
|
|
|
import mekanism.generators.common.GeneratorsCommonProxy;
|
2013-08-27 00:49:32 +02:00
|
|
|
import mekanism.generators.common.tileentity.TileEntityAdvancedSolarGenerator;
|
|
|
|
import mekanism.generators.common.tileentity.TileEntityBioGenerator;
|
|
|
|
import mekanism.generators.common.tileentity.TileEntityElectrolyticSeparator;
|
|
|
|
import mekanism.generators.common.tileentity.TileEntityHeatGenerator;
|
|
|
|
import mekanism.generators.common.tileentity.TileEntityHydrogenGenerator;
|
|
|
|
import mekanism.generators.common.tileentity.TileEntitySolarGenerator;
|
|
|
|
import mekanism.generators.common.tileentity.TileEntityWindTurbine;
|
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
|
|
|
import cpw.mods.fml.client.registry.ClientRegistry;
|
|
|
|
import cpw.mods.fml.client.registry.RenderingRegistry;
|
2013-04-13 16:33:37 +02:00
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
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());
|
|
|
|
ClientRegistry.registerTileEntity(TileEntityElectrolyticSeparator.class, "ElectrolyticSeparator", new RenderElectrolyticSeparator());
|
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 2:
|
|
|
|
return new GuiElectrolyticSeparator(player.inventory, (TileEntityElectrolyticSeparator)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;
|
|
|
|
}
|
|
|
|
}
|