ironbarrels/IronChests2/common/cpw/mods/ironchest/CommonProxy.java

50 lines
1.4 KiB
Java

/*******************************************************************************
* 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.world.World;
import cpw.mods.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.getBlockTileEntity(X, Y, Z);
if (te != null && te instanceof TileEntityIronChest) {
TileEntityIronChest icte = (TileEntityIronChest) te;
return new ContainerIronChestBase(player.inventory, icte, icte.getType(), 0, 0);
} else {
return null;
}
}
public World getClientWorld() {
return null;
}
}