equivalent-exchange-3/src/main/java/com/pahimar/ee3/proxy/CommonProxy.java

169 lines
5.2 KiB
Java
Raw Normal View History

2013-12-17 21:48:21 +01:00
package com.pahimar.ee3.proxy;
2013-08-23 16:59:50 +02:00
import com.pahimar.ee3.client.gui.inventory.*;
import com.pahimar.ee3.inventory.*;
2013-08-23 16:59:50 +02:00
import com.pahimar.ee3.lib.GuiIds;
import com.pahimar.ee3.lib.Strings;
import com.pahimar.ee3.tileentity.TileAlchemicalChest;
import com.pahimar.ee3.tileentity.TileAludel;
import com.pahimar.ee3.tileentity.TileCalcinator;
import com.pahimar.ee3.tileentity.TileGlassBell;
import cpw.mods.fml.common.network.IGuiHandler;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
2013-08-23 16:59:50 +02:00
/**
* Equivalent-Exchange-3
* <p/>
2013-08-23 16:59:50 +02:00
* CommonProxy
*
2013-08-23 16:59:50 +02:00
* @author pahimar
*/
public class CommonProxy implements IGuiHandler
{
2013-08-23 16:59:50 +02:00
public void registerKeyBindingHandler()
{
2013-08-23 16:59:50 +02:00
}
public void registerRenderTickHandler()
{
2013-08-23 16:59:50 +02:00
}
public void registerDrawBlockHighlightHandler()
{
2013-08-23 16:59:50 +02:00
}
public void setKeyBinding(String name, int value)
{
2013-08-23 16:59:50 +02:00
}
public void registerSoundHandler()
{
2013-08-23 16:59:50 +02:00
}
public void initRenderingAndTextures()
{
2013-08-23 16:59:50 +02:00
}
public void registerTileEntities()
{
2013-08-23 16:59:50 +02:00
GameRegistry.registerTileEntity(TileCalcinator.class, Strings.TE_CALCINATOR_NAME);
GameRegistry.registerTileEntity(TileAludel.class, Strings.TE_ALUDEL_NAME);
GameRegistry.registerTileEntity(TileAlchemicalChest.class, Strings.TE_ALCHEMICAL_CHEST_NAME);
GameRegistry.registerTileEntity(TileGlassBell.class, Strings.TE_GLASS_BELL_NAME);
}
public void transmuteBlock(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int sideHit)
{
2013-08-23 16:59:50 +02:00
}
public void sendRequestEventPacket(byte eventType, int originX, int originY, int originZ, byte sideHit, byte rangeX, byte rangeY, byte rangeZ, String data)
{
2013-08-23 16:59:50 +02:00
}
public void handleTileEntityPacket(int x, int y, int z, ForgeDirection orientation, byte state, String customName)
{
2013-08-23 16:59:50 +02:00
}
public void handleTileWithItemPacket(int x, int y, int z, ForgeDirection orientation, byte state, String customName, int itemID, int metaData, int stackSize, int color)
{
2013-08-23 16:59:50 +02:00
}
@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
2013-08-23 16:59:50 +02:00
if (ID == GuiIds.PORTABLE_CRAFTING)
{
2013-08-23 16:59:50 +02:00
return new ContainerPortableCrafting(player.inventory, world, x, y, z);
}
2013-08-23 16:59:50 +02:00
else if (ID == GuiIds.PORTABLE_TRANSMUTATION)
{
2013-08-23 16:59:50 +02:00
return new ContainerPortableTransmutation();
}
else if (ID == GuiIds.CALCINATOR)
{
2013-08-23 16:59:50 +02:00
TileCalcinator tileCalcinator = (TileCalcinator) world.getBlockTileEntity(x, y, z);
return new ContainerCalcinator(player.inventory, tileCalcinator);
}
else if (ID == GuiIds.ALCHEMICAL_CHEST)
{
2013-08-23 16:59:50 +02:00
TileAlchemicalChest tileAlchemicalChest = (TileAlchemicalChest) world.getBlockTileEntity(x, y, z);
return new ContainerAlchemicalChest(player.inventory, tileAlchemicalChest);
}
else if (ID == GuiIds.ALCHEMICAL_BAG)
// TODO Alchemical Bag inventory work is incomplete
{
2013-08-23 16:59:50 +02:00
return new ContainerAlchemicalBag(player.inventory);
}
else if (ID == GuiIds.ALUDEL)
{
2013-08-23 16:59:50 +02:00
TileAludel tileAludel = (TileAludel) world.getBlockTileEntity(x, y, z);
return new ContainerAludel(player.inventory, tileAludel);
}
else if (ID == GuiIds.GLASS_BELL)
{
2013-08-23 16:59:50 +02:00
TileGlassBell tileGlassBell = (TileGlassBell) world.getBlockTileEntity(x, y, z);
return new ContainerGlassBell(player.inventory, tileGlassBell);
}
return null;
}
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
2013-08-23 16:59:50 +02:00
if (ID == GuiIds.PORTABLE_CRAFTING)
{
2013-08-23 16:59:50 +02:00
return new GuiPortableCrafting(player, world, x, y, z);
}
2013-08-23 16:59:50 +02:00
else if (ID == GuiIds.PORTABLE_TRANSMUTATION)
{
2013-08-23 16:59:50 +02:00
return new GuiPortableTransmutation(null);
}
else if (ID == GuiIds.CALCINATOR)
{
2013-08-23 16:59:50 +02:00
TileCalcinator tileCalcinator = (TileCalcinator) world.getBlockTileEntity(x, y, z);
return new GuiCalcinator(player.inventory, tileCalcinator);
}
else if (ID == GuiIds.ALCHEMICAL_CHEST)
{
2013-08-23 16:59:50 +02:00
TileAlchemicalChest tileAlchemicalChest = (TileAlchemicalChest) world.getBlockTileEntity(x, y, z);
return new GuiAlchemicalChest(player.inventory, tileAlchemicalChest);
}
else if (ID == GuiIds.ALCHEMICAL_BAG)
// TODO Alchemical Bag inventory work is incomplete
{
2013-08-23 16:59:50 +02:00
return new GuiAlchemicalBag(player.inventory);
}
else if (ID == GuiIds.ALUDEL)
{
2013-08-23 16:59:50 +02:00
TileAludel tileAludel = (TileAludel) world.getBlockTileEntity(x, y, z);
return new GuiAludel(player.inventory, tileAludel);
}
else if (ID == GuiIds.GLASS_BELL)
{
2013-08-23 16:59:50 +02:00
TileGlassBell tileGlassBell = (TileGlassBell) world.getBlockTileEntity(x, y, z);
return new GuiGlassBell(player.inventory, tileGlassBell);
}
return null;
}
}