Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small lack of Interaction with Tinker's Construct [Request/Bug?] #120

Open
Cerubois opened this issue May 19, 2022 · 2 comments
Open

Small lack of Interaction with Tinker's Construct [Request/Bug?] #120

Cerubois opened this issue May 19, 2022 · 2 comments

Comments

@Cerubois
Copy link

Using version Minecraft 1.18.1, I'm a fan of using the TC's 'Overslime' tools to save me some durability on tools.

However, I noticed that when I have those tools stored in my ToolBelt, they don't actually accumulate Overslime like they would in my inventory.

I have 0 experience in modding Minecraft, but as a programmer I can try to speculate why it's not working:

  • Somehow the tools in the Tool Belt are not affected either by TC's mechanics, or by game time (or is it random ticks?).
  • Is there an 'update tool' tick (or something) that isn't getting called?
  • Are the tools counted as being in inventory, or as in some weird dimensional bubble outside of time?

No idea how off-base I am here, but it'd be great to see that working somehow!

@gigaherz
Copy link
Owner

Minecraft has an "inventoryTick" method that it calls on items that are in the inventory.... but it includes the slot number of the inventory, so it's not usable by mods that add secondary containers, because there's no way to have the custom slots as part of the same sequence. Because of that, most "extra slots" mods like say, Curios, have an API similar to the inventoryTick, but for their own slots. In a way, using your own words, each mod adding extra slots has those slots existing in their own "dimensional bubble".

In principle I could do the same for ToolBelt's slots: I would "just" have to define an API for items that are in toolbelt to receive a notification. However, that API wouldn't be an existing standard, every other mod would need explicit support of Toolbelt ticking.

On top of that, due to how the items in a toolbelt do not exists in an explicit inventory, but rather exist inside the NBT of the belt, it would be quite inefficient to have to create the item stack from NBT, call the tick method, and then turn the stack back to NBT.

So, while I agree that this would be good to have, and I have known I should have something for basically as long as Tool Belt has existed, it would require a MAJOR reorganization to how Tool Belt works, so it's not going to happen any time soon, specially not for an interim version like 1.18.1.

@Cerubois
Copy link
Author

Aha, thank you for the summary. That does sound like a heck of a task, though I'm surprised there isn't an API solution like that floating around already.

Anyway, I feel more educated, so thanks again and cheers for the mod. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants