Jump to content

Detecting Stacksize in a inventory


Moritz

Recommended Posts

Something what is not a normal kind of error.

 

Something like that:

 

BlockID = 0

BlockID <= -1

And some errors about my OneSlotTinyChest (Advanced)

And he links to the (my link i postet)

   

    public void updateEntity()

    {

    if(worldObj.isRemote)

    {

    for(int i = 0; i < getSizeInventory(); i++)

    {

    if(advTinyChest.stackSize >= this.getInventoryStackLimit())

    {

    isFull = true;

    }

    else if(advTinyChest.stackSize < this.getInventoryStackLimit() && advTinyChest.stackSize == advTinyChest.getMaxStackSize())

    {

    isFull = true;

    }

    else

    {

    isFull = false;

    }

   

    if(advTinyChest == null)

    {

    isEmpty = true;

    }

    else

    {

    isEmpty = false;

    }

    }

    }

    }

 

Please look into my source

 

Link to comment
Share on other sites

 

Something what is not a normal kind of error.

 

Something like that:

 

BlockID = 0

BlockID <= -1

And some errors about my OneSlotTinyChest (Advanced)

And he links to the (my link i postet)

   

    public void updateEntity()

    {

    if(worldObj.isRemote)

    {

    for(int i = 0; i < getSizeInventory(); i++)

    {

    if(advTinyChest.stackSize >= this.getInventoryStackLimit())

    {

    isFull = true;

    }

    else if(advTinyChest.stackSize < this.getInventoryStackLimit() && advTinyChest.stackSize == advTinyChest.getMaxStackSize())

    {

    isFull = true;

    }

    else

    {

    isFull = false;

    }

   

    if(advTinyChest == null)

    {

    isEmpty = true;

    }

    else

    {

    isEmpty = false;

    }

    }

    }

    }

 

Please look into my source

 

 

I know how to read code but my brain doesn't compile java code to check what the error is, need the error log.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.