Advertisement
HalestormXV

Untitled

Aug 27th, 2017
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.13 KB | None | 0 0
  1. package halestormxv.eAngelus.gui;
  2.  
  3. import halestormxv.eAngelus.tileentity.TileEntityDualFurnace;
  4. import net.minecraft.entity.player.EntityPlayer;
  5. import net.minecraft.util.math.BlockPos;
  6. import net.minecraft.world.World;
  7. import net.minecraftforge.fml.common.network.IGuiHandler;
  8.  
  9. import javax.annotation.Nullable;
  10.  
  11. /**
  12.  * Created by Blaze on 8/27/2017.
  13.  */
  14. public class DualFurnaceGuiHandler implements IGuiHandler
  15. {
  16.     public static final int DUAL_FURNACE_GUI = 0;
  17.  
  18.     @Nullable
  19.     @Override
  20.     public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
  21.     {
  22.         if(ID == DUAL_FURNACE_GUI)
  23.             return new ContainerDualFurnace(player.inventory, ((TileEntityDualFurnace)world.getTileEntity(new BlockPos(x, y, z))));
  24.         return null;
  25.     }
  26.  
  27.     @Nullable
  28.     @Override
  29.     public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
  30.     {
  31.         if(ID == DUAL_FURNACE_GUI)
  32.             return new GuiDualFurnace(player.inventory, ((TileEntityDualFurnace)world.getTileEntity(new BlockPos(x, y, z))));
  33.         return null;
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement