2014-06-04 21:44:48 -08:00
|
|
|
package tconstruct.tools;
|
|
|
|
|
|
2014-06-06 19:46:05 -08:00
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
|
import net.minecraft.tileentity.TileEntity;
|
|
|
|
|
import net.minecraft.world.World;
|
2023-01-28 18:04:28 -08:00
|
|
|
|
2014-09-09 18:30:15 +10:00
|
|
|
import cpw.mods.fml.common.network.IGuiHandler;
|
2023-05-15 15:07:18 +09:00
|
|
|
import mantle.blocks.abstracts.InventoryLogic;
|
|
|
|
|
import tconstruct.common.TProxyCommon;
|
2014-06-04 21:44:48 -08:00
|
|
|
|
2022-09-22 19:51:23 +01:00
|
|
|
public class ToolProxyCommon implements IGuiHandler {
|
2023-01-28 18:04:28 -08:00
|
|
|
|
2014-06-06 19:46:05 -08:00
|
|
|
public static final int toolStationID = 0;
|
|
|
|
|
public static final int partBuilderID = 1;
|
|
|
|
|
public static final int patternChestID = 2;
|
|
|
|
|
public static final int stencilTableID = 3;
|
|
|
|
|
public static final int frypanGuiID = 4;
|
|
|
|
|
public static final int toolForgeID = 5;
|
|
|
|
|
public static final int furnaceID = 8;
|
|
|
|
|
public static final int craftingStationID = 11;
|
2014-09-12 23:56:05 +10:00
|
|
|
public static final int battlesignTextID = 12;
|
2014-06-30 14:57:06 -08:00
|
|
|
|
2022-09-22 19:51:23 +01:00
|
|
|
public ToolProxyCommon() {}
|
2014-07-02 20:27:32 -08:00
|
|
|
|
2022-09-22 19:51:23 +01:00
|
|
|
public void initialize() {
|
2014-09-09 18:30:15 +10:00
|
|
|
registerGuiHandler();
|
2014-06-06 19:46:05 -08:00
|
|
|
}
|
2014-09-09 18:30:15 +10:00
|
|
|
|
2022-09-22 19:51:23 +01:00
|
|
|
protected void registerGuiHandler() {
|
2014-06-30 14:57:06 -08:00
|
|
|
TProxyCommon.registerServerGuiHandler(toolStationID, this);
|
|
|
|
|
TProxyCommon.registerServerGuiHandler(partBuilderID, this);
|
|
|
|
|
TProxyCommon.registerServerGuiHandler(patternChestID, this);
|
|
|
|
|
TProxyCommon.registerServerGuiHandler(stencilTableID, this);
|
|
|
|
|
TProxyCommon.registerServerGuiHandler(frypanGuiID, this);
|
|
|
|
|
TProxyCommon.registerServerGuiHandler(toolForgeID, this);
|
|
|
|
|
TProxyCommon.registerServerGuiHandler(furnaceID, this);
|
|
|
|
|
TProxyCommon.registerServerGuiHandler(craftingStationID, this);
|
2014-06-06 19:46:05 -08:00
|
|
|
}
|
2014-09-09 18:30:15 +10:00
|
|
|
|
2014-06-06 19:46:05 -08:00
|
|
|
@Override
|
2022-09-22 19:51:23 +01:00
|
|
|
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
2014-06-06 19:46:05 -08:00
|
|
|
TileEntity tile = world.getTileEntity(x, y, z);
|
2023-01-25 23:27:18 +01:00
|
|
|
if (tile instanceof InventoryLogic) {
|
2014-06-06 19:46:05 -08:00
|
|
|
return ((InventoryLogic) tile).getGuiContainer(player.inventory, world, x, y, z);
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
2014-09-09 18:30:15 +10:00
|
|
|
|
2014-06-06 19:46:05 -08:00
|
|
|
@Override
|
2022-09-22 19:51:23 +01:00
|
|
|
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
2014-06-06 19:46:05 -08:00
|
|
|
return null;
|
|
|
|
|
}
|
2014-06-04 21:44:48 -08:00
|
|
|
}
|