Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package kyros.testMod.handler;
- import cpw.mods.fml.common.network.IGuiHandler;
- import kyros.testMod.testMod;
- import kyros.testMod.container.ContainerCCrafter;
- import kyros.testMod.gui.guiCCrafter;
- import net.minecraft.client.resources.I18n;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.tileentity.TileEntity;
- import net.minecraft.world.World;
- public class GuiHandler implements IGuiHandler {
- @Override
- public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
- TileEntity entity = world.getTileEntity(x, y, z);
- if(entity != null) {
- if(ID == testMod.ENUM_IDS.CRafter.ordinal()) {
- return new ContainerCCrafter(player.inventory, world, x, y, z);
- }
- }
- return null;
- }
- @Override
- public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
- TileEntity entity = world.getTileEntity(x, y, z);
- if(entity != null)
- {
- if(ID == testMod.ENUM_IDS.CRafter.ordinal()) {
- return new guiCCrafter(player.inventory, world, x, y, z);
- }
- }
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment