ironbarrels/src/main/java/cpw/mods/ironchest/CommonProxy.java

57 lines
1.6 KiB
Java
Executable File

/*******************************************************************************
* Copyright (c) 2012 cpw.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* cpw - initial API and implementation
******************************************************************************/
package cpw.mods.ironchest;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.network.IGuiHandler;
public class CommonProxy implements IGuiHandler {
public void registerRenderInformation()
{
}
public void registerTileEntitySpecialRenderer(IronChestType typ)
{
}
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
return null;
}
@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
TileEntity te = world.getTileEntity(new BlockPos(x, y, z));
if (te != null && te instanceof TileEntityIronChest)
{
TileEntityIronChest icte = (TileEntityIronChest) te;
return new ContainerIronChest(player.inventory, icte, icte.getType(), 0, 0);
}
else
{
return null;
}
}
public World getClientWorld()
{
return null;
}
}