2012-08-15 22:41:41 +02:00
|
|
|
package net.uberkat.obsidian.client;
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
import java.io.FileInputStream;
|
|
|
|
import java.io.FileOutputStream;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.util.Properties;
|
|
|
|
|
|
|
|
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
|
|
|
import cpw.mods.fml.client.registry.RenderingRegistry;
|
|
|
|
import cpw.mods.fml.common.Side;
|
|
|
|
import cpw.mods.fml.common.network.IGuiHandler;
|
|
|
|
import cpw.mods.fml.common.registry.TickRegistry;
|
|
|
|
import net.minecraft.client.Minecraft;
|
|
|
|
import net.minecraft.src.Block;
|
|
|
|
import net.minecraft.src.EntityPlayer;
|
|
|
|
import net.minecraft.src.GuiScreen;
|
|
|
|
import net.minecraft.src.IBlockAccess;
|
|
|
|
import net.minecraft.src.ModLoader;
|
|
|
|
import net.minecraft.src.RenderBlocks;
|
|
|
|
import net.minecraft.src.World;
|
|
|
|
import net.minecraftforge.client.MinecraftForgeClient;
|
|
|
|
import net.uberkat.obsidian.common.CommonProxy;
|
2012-08-17 03:46:21 +02:00
|
|
|
import net.uberkat.obsidian.common.ContainerTheoreticalElementizer;
|
2012-08-15 22:41:41 +02:00
|
|
|
import net.uberkat.obsidian.common.EntityKnife;
|
|
|
|
import net.uberkat.obsidian.common.EntityObsidianArrow;
|
|
|
|
import net.uberkat.obsidian.common.EntityObsidianTNT;
|
2012-08-26 15:48:42 +02:00
|
|
|
import net.uberkat.obsidian.common.ObsidianIngots;
|
2012-08-15 22:41:41 +02:00
|
|
|
import net.uberkat.obsidian.common.ObsidianUtils;
|
|
|
|
import net.uberkat.obsidian.common.TileEntityCombiner;
|
|
|
|
import net.uberkat.obsidian.common.TileEntityCrusher;
|
|
|
|
import net.uberkat.obsidian.common.TileEntityEnrichmentChamber;
|
|
|
|
import net.uberkat.obsidian.common.TileEntityPlatinumCompressor;
|
2012-08-17 03:46:21 +02:00
|
|
|
import net.uberkat.obsidian.common.TileEntityTheoreticalElementizer;
|
2012-08-15 22:41:41 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Client proxy for Obsidian Ingots mod.
|
|
|
|
* @author AidanBrady
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public class ClientProxy extends CommonProxy
|
|
|
|
{
|
|
|
|
public void registerRenderInformation()
|
|
|
|
{
|
|
|
|
System.out.println("[ObsidianIngots] Beginning render initiative...");
|
|
|
|
//Preload block/item textures
|
|
|
|
MinecraftForgeClient.preloadTexture("/obsidian/items.png");
|
|
|
|
MinecraftForgeClient.preloadTexture("/obsidian/terrain.png");
|
|
|
|
MinecraftForgeClient.preloadTexture("/obsidian/Compressor.png");
|
|
|
|
MinecraftForgeClient.preloadTexture("/obsidian/Combiner.png");
|
2012-08-17 03:46:21 +02:00
|
|
|
MinecraftForgeClient.preloadTexture("/obsidian/Elementizer.png");
|
2012-08-15 22:41:41 +02:00
|
|
|
|
|
|
|
//Register entity rendering handlers
|
|
|
|
RenderingRegistry.registerEntityRenderingHandler(EntityObsidianTNT.class, new RenderObsidianTNT());
|
|
|
|
RenderingRegistry.registerEntityRenderingHandler(EntityObsidianArrow.class, new RenderObsidianArrow());
|
|
|
|
RenderingRegistry.registerEntityRenderingHandler(EntityKnife.class, new RenderKnife());
|
|
|
|
System.out.println("[ObsidianIngots] Render initiative complete.");
|
|
|
|
}
|
|
|
|
|
|
|
|
public void loadUtilities()
|
|
|
|
{
|
|
|
|
System.out.println("[ObsidianIngots] Beginning utility initiative...");
|
2012-08-26 15:48:42 +02:00
|
|
|
ObsidianIngots.latestVersionNumber = ObsidianUtils.getLatestVersion();
|
|
|
|
ObsidianIngots.recentNews = ObsidianUtils.getRecentNews();
|
2012-08-18 01:53:42 +02:00
|
|
|
new ThreadServerData();
|
2012-08-15 22:41:41 +02:00
|
|
|
System.out.println("[ObsidianIngots] Utility initiative complete.");
|
|
|
|
}
|
|
|
|
|
|
|
|
public GuiScreen getClientGui(int ID, EntityPlayer player, World world, int x, int y, int z)
|
|
|
|
{
|
|
|
|
switch(ID)
|
|
|
|
{
|
|
|
|
case 18:
|
|
|
|
return new GuiStopwatch(player);
|
|
|
|
case 19:
|
|
|
|
return new GuiCredits();
|
|
|
|
case 20:
|
|
|
|
return new GuiWeatherOrb(player);
|
|
|
|
case 21:
|
|
|
|
TileEntityEnrichmentChamber tileentity = (TileEntityEnrichmentChamber)world.getBlockTileEntity(x, y, z);
|
|
|
|
return new GuiEnrichmentChamber(player.inventory, tileentity);
|
|
|
|
case 22:
|
|
|
|
TileEntityPlatinumCompressor tileentity1 = (TileEntityPlatinumCompressor)world.getBlockTileEntity(x, y, z);
|
|
|
|
return new GuiPlatinumCompressor(player.inventory, tileentity1);
|
|
|
|
case 23:
|
|
|
|
TileEntityCombiner tileentity2 = (TileEntityCombiner)world.getBlockTileEntity(x, y, z);
|
|
|
|
return new GuiCombiner(player.inventory, tileentity2);
|
|
|
|
case 24:
|
|
|
|
TileEntityCrusher tileentity3 = (TileEntityCrusher)world.getBlockTileEntity(x, y, z);
|
|
|
|
return new GuiCrusher(player.inventory, tileentity3);
|
2012-08-17 03:46:21 +02:00
|
|
|
case 25:
|
|
|
|
TileEntityTheoreticalElementizer tileentity4 = (TileEntityTheoreticalElementizer)world.getBlockTileEntity(x, y, z);
|
|
|
|
return new GuiTheoreticalElementizer(player.inventory, tileentity4);
|
2012-08-15 22:41:41 +02:00
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void loadTickHandler()
|
|
|
|
{
|
|
|
|
TickRegistry.registerTickHandler(new ClientTickHandler(), Side.CLIENT);
|
|
|
|
}
|
|
|
|
}
|