Project MMO

Project MMO

10M Downloads

Feature Request : Either swap to a cached solution or actually parse world data to processReqs

Smartin-b opened this issue ยท 2 comments

commented

Describe the solution you'd like
Parsing in actual Itemstacks into here instead of creating one for the ID.

public static Map<String, Long> processReqs(ReqType type, ResourceLocation stackID) {

Why is this feature needed
At the moment Project MMO is fundamentally not compatible with Modular Item Mods like Truly Modular

Describe alternatives you've considered
At the moment, processReqs gets called continously for the same items, (entities and blocks too).
but internally, it defaults to creating a base Items instead of using inworld data.
This means, that Project MMO continously recalculates the data for every item/block/entity currently in context, that is highly innefficient.
IF no itemstack sensitivity is added, at least add caching based on ID.

commented

Since i see you've also done some work with Tetra, here's a tetra configuration example, albeit more complicated due to Tetra's higher permutations.

commented

All AutoValues are cached here

As for items that use NBT for modularity, PMMO has a system for that. AutoValues are not intended to capture that use case. AutoValues are a fallback system to provide settings to items in mods that don't have default configurations set in a datapack. Their goal is to provide players with a dynamically available experience, but they are not perfect. For that, the player or modpack maker is expected to configure the mod to meet their specific needs.

You can read more about NBT configurations for your Truly Modular mod here
and you can review and example for a Tinker's Construct configuration here