mirror of
https://github.com/GTNewHorizons/IguanaTweaksTConstruct.git
synced 2026-11-26 14:53:02 +00:00
36 lines
1.1 KiB
Java
36 lines
1.1 KiB
Java
package iguanaman.iguanatweakstconstruct.proxy;
|
|
|
|
import mantle.blocks.abstracts.InventoryLogic;
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
import net.minecraft.tileentity.TileEntity;
|
|
import net.minecraft.world.World;
|
|
import tconstruct.tools.ToolProxyCommon;
|
|
import cpw.mods.fml.common.network.IGuiHandler;
|
|
|
|
public class CommonProxy implements IGuiHandler
|
|
{
|
|
|
|
public void registerRenderers() {}
|
|
|
|
public void registerSounds() {}
|
|
|
|
@Override
|
|
public Object getServerGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z)
|
|
{
|
|
if (ID == ToolProxyCommon.toolStationID || ID == ToolProxyCommon.partBuilderID || ID == ToolProxyCommon.patternChestID
|
|
|| ID == ToolProxyCommon.toolForgeID || ID == ToolProxyCommon.stencilTableID)
|
|
{
|
|
TileEntity tile = world.getTileEntity(x, y, z);
|
|
if (tile != null && tile instanceof InventoryLogic)
|
|
return ((InventoryLogic) tile).getGuiContainer(player.inventory, world, x, y, z);
|
|
}
|
|
|
|
return null;
|
|
}
|
|
|
|
@Override
|
|
public Object getClientGuiElement(int ID, EntityPlayer player,
|
|
World world, int x, int y, int z) {
|
|
return null;
|
|
}
|
|
} |