Jump to content

Total World Item Count


Kroppen

Recommended Posts

Hello everyone,

 

I'm pretty new to modding and I had a question regarding a way to count items and return a value (count amt.). If that was vague, what I meant was, a way to return a number value based on the total amount of items in a world. ex. Player 1 has 10 XITEM, and Player 2 has 4 XITEM, the value would return as 14. Keep in mind, this has to be a live count. *Not sure if this has been answered before, but I couldn't find anything.

 

Thanks for any help,

 

-kroppen

Link to comment
Share on other sites

Simple answer: This is impossible.

 

Longer answer: ItemStacks can be in World (EntityItem) or in Inventory (Entities' including players' or TileEntities' like chest and other).

Aside from that - all of above can be loaded or unloaded from world.

 

Notes: It is possible to parially keep track of stuff - but NEVER fully (because e.g if other mod would add ItemStack somewhere without you knowing, your whole system fails).

 

Knowing above you could ask less demanding (from MC) stuff. Anything comes to you mind?

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

+coolAlias

 

I was trying to get a total item count for a custom item, one that I've added. The purpose of this was to get a count of MoneyItems, so that I could calculate inflation in-game, affecting the value of the currency in a world market GUI. I was going to track 1-5 items.

 

Thanks

-kroppen

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.