Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.crilleslo.gui;
- import com.crilleslo.container.ContainerWindmill;
- import com.crilleslo.tileentity.TileEntityWindmill;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.tileentity.TileEntity;
- import net.minecraft.world.World;
- import cpw.mods.fml.common.network.IGuiHandler;
- public class GuiHandler implements IGuiHandler {
- public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
- TileEntity tileEntity = world.getTileEntity(x, y, z);
- switch(ID) {
- case 0:
- if(tileEntity instanceof TileEntityWindmill) return new ContainerWindmill(player.inventory, (TileEntityWindmill) tileEntity);
- default:
- return null;
- }
- }
- public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
- TileEntity tileEntity = world.getTileEntity(x, y, z);
- switch(ID) {
- case 0:
- if(tileEntity instanceof TileEntityWindmill) return new GuiWindmill(player.inventory, (TileEntityWindmill) tileEntity);
- default:
- return null;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment