Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.happykiller.weightlimit.client.gui;
- import com.happykiller.weightlimit.client.gui.player.GuiWeightedPlayer;
- import com.happykiller.weightlimit.main.ModMain;
- import com.happykiller.weightlimit.player.ExtendedPlayer;
- import com.happykiller.weightlimit.player.inventory.container.ContainerWeightedPlayer;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.world.World;
- import net.minecraftforge.fml.common.network.IGuiHandler;
- public class GuiHandler implements IGuiHandler {
- public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
- System.out.println("Ran Server side GUI");
- if(ID == ModMain.GUI_CUSTOM_INV) {
- return new ContainerWeightedPlayer(player, player.inventory, ExtendedPlayer.get(player).inv);
- }else {
- return null;
- }
- }
- public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
- System.out.println("Ran Client side GUI");
- if(ID == ModMain.GUI_CUSTOM_INV) {
- System.out.println("ID WAS FOR INV");
- return new GuiWeightedPlayer(player, player.inventory, ExtendedPlayer.get(player).inv);
- }else {
- return null;
- }
- }
- }
Add Comment
Please, Sign In to add comment