Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.Looke81.BioWarfare.handler;
- import com.Looke81.BioWarfare.BioWarfare;
- import com.Looke81.BioWarfare.container.ContainerMicrobeExtractor;
- import com.Looke81.BioWarfare.gui.GuiMicrobeExtractor;
- import com.Looke81.BioWarfare.tileentity.TileEntityMicrobeExtractor;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.item.ItemStack;
- import net.minecraft.tileentity.TileEntity;
- import net.minecraft.world.World;
- import cpw.mods.fml.common.network.IGuiHandler;
- public class GuiHandler1 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) {
- switch(ID) {
- case BioWarfare.guiIDMicrobeExtractor:
- if (entity instanceof TileEntityMicrobeExtractor) {
- return new ContainerMicrobeExtractor(player.inventory, (TileEntityMicrobeExtractor) entity);
- }
- return null;
- }
- }
- 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) {
- switch(ID) {
- case BioWarfare.guiIDMicrobeExtractor:
- if (entity instanceof TileEntityMicrobeExtractor) {
- return new GuiMicrobeExtractor(player.inventory, (TileEntityMicrobeExtractor) entity);
- }
- return null;
- }
- }
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment