Prevent Alchemical Bag GUI from being opened while it's inventory is being finished up
This commit is contained in:
parent
683cde92fb
commit
09b07b460e
1 changed files with 9 additions and 5 deletions
|
@ -1,10 +1,8 @@
|
|||
package com.pahimar.ee3.item;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.helper.ItemHelper;
|
||||
import com.pahimar.ee3.helper.ItemStackNBTHelper;
|
||||
import com.pahimar.ee3.lib.Colours;
|
||||
import com.pahimar.ee3.lib.GuiIds;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
@ -13,6 +11,7 @@ import net.minecraft.creativetab.CreativeTabs;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ChatMessageComponent;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -66,10 +65,15 @@ public class ItemAlchemicalBag extends ItemEE implements IDyeable
|
|||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer)
|
||||
{
|
||||
if (!world.isRemote)
|
||||
// if (!world.isRemote)
|
||||
// {
|
||||
// ItemStackNBTHelper.setBoolean(itemStack, Strings.NBT_ITEM_ALCHEMICAL_BAG_GUI_OPEN, true);
|
||||
// entityPlayer.openGui(EquivalentExchange3.instance, GuiIds.ALCHEMICAL_BAG, entityPlayer.worldObj, (int) entityPlayer.posX, (int) entityPlayer.posY, (int) entityPlayer.posZ);
|
||||
// }
|
||||
|
||||
if (world.isRemote)
|
||||
{
|
||||
ItemStackNBTHelper.setBoolean(itemStack, Strings.NBT_ITEM_ALCHEMICAL_BAG_GUI_OPEN, true);
|
||||
entityPlayer.openGui(EquivalentExchange3.instance, GuiIds.ALCHEMICAL_BAG, entityPlayer.worldObj, (int) entityPlayer.posX, (int) entityPlayer.posY, (int) entityPlayer.posZ);
|
||||
entityPlayer.sendChatToPlayer(ChatMessageComponent.createFromText("Pahimar: Sorry not ready yet!"));
|
||||
}
|
||||
|
||||
return itemStack;
|
||||
|
|
Loading…
Reference in a new issue