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

[Feature request] Generalized version of this mod #46

Open
GanerCodes opened this issue Jul 31, 2024 · 3 comments
Open

[Feature request] Generalized version of this mod #46

GanerCodes opened this issue Jul 31, 2024 · 3 comments
Assignees

Comments

@GanerCodes
Copy link

Hey, so this mod is great and is very useful. However I think a better approach would to programmatically scan, and according to some rules (i.e. "only blocks") create compressed variants. This would make it automatically extend for all minecraft and modded blocks. Another suggestion is instead of new items being registered perhaps you could have a "base" compressed item who's information & text are stored in the tags to avoid pages of item managers being filled with compressed variants of things.

@GanerCodes GanerCodes added the bug Something isn't working label Jul 31, 2024
@sa-shiro
Copy link
Owner

sa-shiro commented Jul 31, 2024

for 1)
This requires the generation of resources at runtime and i couldnt figure out how to properly register a client and server resource pack on client and server (and depending on the amount of added blocks, this can take forever, keep in mind that only the current added blocks already have a sum of 40.000+ files) and you also have to consider client/server de-synchronization, configs etc must match

for 2)
This is not possible as what you suggest is basically using block states, but you can not craft nbt or blockstate blocks (unless Minecraft finally decides to change this.... hopefully some day)
The only workaround to this would be to add a dedicated crafting table which eliminates the purpose of this mod

edit:
and even if there is some hacky way to achieve this, this will not prevent item managers from being clogged with thousands of recipes, why? because it will grab every existing recipe and will display it
There might be a way to de-clog it by using the item manager's api to unify blocks so it is only one recipe for all of the blocks, if it doesnt automatically unify blocks which have the same tags

@sa-shiro sa-shiro added suggestions and removed bug Something isn't working labels Jul 31, 2024
@GanerCodes
Copy link
Author

GanerCodes commented Jul 31, 2024

Well, dynamic items are possible as shown here https://youtu.be/bD6PSBtQwww

Hopefully blocks might be possible with this? https://github.com/lukebemishprojects/DynamicAssetGenerator

For crafting this tech might work https://old.reddit.com/r/MinecraftCommands/comments/nwqkrw/nbt_crafting_in_the_vanilla_crafting_table_is/h1ailij/

Alternative for crafting maybe add some mixins into the crafting table GUI update, so if it's all filled it generates the item (if not already cached) and places it into the grab-slot

Edit: also for me personally a compressor block would be totally fine. ngl it feel like it would be more balanced if the crafter itself had to be compressed, so like a N-compressed crafting table can craft up to 2N-compressed items; just a thought

@sa-shiro
Copy link
Owner

sa-shiro commented Aug 3, 2024

For items and crafting: it wont work, as it is as i mentioned a "hacky" way to do it and it will mess up a lot (for example: stacks can not be tracked as mentioned by the creator)

For the generator: Last time i wanted to use a lib the lib didn't have any doc at all and i didn't want to go through the entire source code to see what does what etc. Maybe I'll have a look at this one

For Mixins: Using them especially for modifying the crafting system can mess up a lot and will likely break any mod that access the classes i have to modify

You have to be careful with mixins, however be noted that I didn't use them by myself yet, only seen other devs talking about the mixin hell

Having a compressor chain is kinda overkill imo tbh (as i understood it: Compressor for c1, Double compressor for c2 ... Giga Compressor for c10) if at all, one compressor should be enough

Edit:
another solution could be that only the first level of compressed blocks can be crafted using the vanilla crafting, all subsequent compression levels could be crafted by using a compressor crafting table

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

No branches or pull requests

2 participants