2013-12-17 21:48:21 +01:00
|
|
|
package com.pahimar.ee3.proxy;
|
2013-08-23 16:59:50 +02:00
|
|
|
|
2013-12-16 02:26:42 +01: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;
|
2013-12-16 02:26:42 +01:00
|
|
|
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
|
2013-12-16 02:26:42 +01:00
|
|
|
* <p/>
|
2013-08-23 16:59:50 +02:00
|
|
|
* CommonProxy
|
2013-12-16 02:26:42 +01:00
|
|
|
*
|
2013-08-23 16:59:50 +02:00
|
|
|
* @author pahimar
|
|
|
|
*/
|
2013-12-16 02:26:42 +01:00
|
|
|
public class CommonProxy implements IGuiHandler
|
|
|
|
{
|
2013-08-23 16:59:50 +02:00
|
|
|
|
2013-12-16 02:26:42 +01:00
|
|
|
public void registerKeyBindingHandler()
|
|
|
|
{
|
2013-08-23 16:59:50 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2013-12-16 02:26:42 +01:00
|
|
|
public void registerRenderTickHandler()
|
|
|
|
{
|
2013-08-23 16:59:50 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2013-12-16 02:26:42 +01:00
|
|
|
public void registerDrawBlockHighlightHandler()
|
|
|
|
{
|
2013-08-23 16:59:50 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2013-12-16 02:26:42 +01:00
|
|
|
public void setKeyBinding(String name, int value)
|
|
|
|
{
|
2013-08-23 16:59:50 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2013-12-16 02:26:42 +01:00
|
|
|
public void registerSoundHandler()
|
|
|
|
{
|
2013-08-23 16:59:50 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2013-12-16 02:26:42 +01:00
|
|
|
public void initRenderingAndTextures()
|
|
|
|
{
|
2013-08-23 16:59:50 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2013-12-16 02:26:42 +01: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);
|
|
|
|
}
|
|
|
|
|
2013-12-16 02:26:42 +01:00
|
|
|
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
|
|
|
|
|
|
|
}
|
|
|
|
|
2013-12-16 02:26:42 +01: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
|
|
|
|
|
|
|
}
|
|
|
|
|
2013-12-16 02:26:42 +01:00
|
|
|
public void handleTileEntityPacket(int x, int y, int z, ForgeDirection orientation, byte state, String customName)
|
|
|
|
{
|
2013-08-23 16:59:50 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2013-12-16 02:26:42 +01: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
|
2013-12-16 02:26:42 +01:00
|
|
|
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-12-16 02:26:42 +01:00
|
|
|
{
|
2013-08-23 16:59:50 +02:00
|
|
|
return new ContainerPortableCrafting(player.inventory, world, x, y, z);
|
2013-12-16 02:26:42 +01:00
|
|
|
}
|
2013-08-23 16:59:50 +02:00
|
|
|
else if (ID == GuiIds.PORTABLE_TRANSMUTATION)
|
2013-12-16 02:26:42 +01:00
|
|
|
{
|
2013-08-23 16:59:50 +02:00
|
|
|
return new ContainerPortableTransmutation();
|
2013-12-16 02:26:42 +01:00
|
|
|
}
|
|
|
|
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);
|
|
|
|
}
|
2013-12-16 02:26:42 +01:00
|
|
|
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)
|
2013-12-16 02:26:42 +01:00
|
|
|
// TODO Alchemical Bag inventory work is incomplete
|
|
|
|
{
|
2013-08-23 16:59:50 +02:00
|
|
|
return new ContainerAlchemicalBag(player.inventory);
|
2013-12-16 02:26:42 +01:00
|
|
|
}
|
|
|
|
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);
|
|
|
|
}
|
2013-12-16 02:26:42 +01:00
|
|
|
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
|
2013-12-16 02:26:42 +01:00
|
|
|
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-12-16 02:26:42 +01:00
|
|
|
{
|
2013-08-23 16:59:50 +02:00
|
|
|
return new GuiPortableCrafting(player, world, x, y, z);
|
2013-12-16 02:26:42 +01:00
|
|
|
}
|
2013-08-23 16:59:50 +02:00
|
|
|
else if (ID == GuiIds.PORTABLE_TRANSMUTATION)
|
2013-12-16 02:26:42 +01:00
|
|
|
{
|
2013-08-23 16:59:50 +02:00
|
|
|
return new GuiPortableTransmutation(null);
|
2013-12-16 02:26:42 +01:00
|
|
|
}
|
|
|
|
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);
|
|
|
|
}
|
2013-12-16 02:26:42 +01:00
|
|
|
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)
|
2013-12-16 02:26:42 +01:00
|
|
|
// TODO Alchemical Bag inventory work is incomplete
|
|
|
|
{
|
2013-08-23 16:59:50 +02:00
|
|
|
return new GuiAlchemicalBag(player.inventory);
|
2013-12-16 02:26:42 +01:00
|
|
|
}
|
|
|
|
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);
|
|
|
|
}
|
2013-12-16 02:26:42 +01:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|