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

Improve tier handling & recipe generation #19

Merged
merged 17 commits into from
Mar 12, 2024
Merged

Conversation

Pilzinsel64
Copy link

@Pilzinsel64 Pilzinsel64 commented Mar 3, 2024

With this PR I want to improve the handling of different tiers and make it more dynamically. It will then be easier to add new tiers or add and enable multiple versions of a block within one tier.

At the moment this PR has the state of before but adds a few more recipes due dynamic recipe generation wich does NOT affect the usage in GTNH as within GTNH the recipes get not generated at all.

I am not sure about compat between IronChestMinecarts and IronTanks, I only tested Et Futurum Requiem and this still works fine.

Todo:

  • Regorganize tiers in IronChestType
  • Reorganize recipe generation
  • Seperated configs for Silver chests and Netherite chests
    • Does not change the default and existing configurations and just add more variability to enable more chest types for the same tier, if wanted.
  • Adjust recipes for upgrades
  • Adjust mappings handling
  • Add missing new upgrades due dynamic --> affects GTNH
    • Crystal to Dark steel
    • Obsidian to Dark steel
    • Iron to Steel
    • Iron to Silver

@Pilzinsel64
Copy link
Author

Pilzinsel64 commented Mar 3, 2024

As of now I am ready with this and my local tests seems to be fine. But I still want to give it a test on my private test server to ensure it works fine on an existing world.

There are just a few upgrades missing that needs to be added. The recipes for upgrading a chest block are available.

If someone want to test this with a GTNH world, feel free. :)

@Pilzinsel64 Pilzinsel64 marked this pull request as ready for review March 4, 2024 06:44
@Pilzinsel64
Copy link
Author

Pilzinsel64 commented Mar 4, 2024

It's finished now and ready for review. Later this day when I finsihed work I'm going to test this on my test server to go 100%ly sure everything works fine even an existing world.
EDIT: Works fine on an existing world with iron chests.

From my dev-tests everything seems fine under the following conditions:

  • enable dark steel & netherite & silver & steel
  • enable dark steel & silver & steel
  • enable netherite & silver & steel
  • enable dark steel & netherite & steel
  • enable dark steel & netherite & silver
  • enable silver & dark steel
  • enable silver & netherite
  • enable steel & dark steel
  • enable steel & netherite

@Pilzinsel64 Pilzinsel64 requested a review from a team March 4, 2024 06:47
@unicornbloods
Copy link

Netherite is only supposed supposed to be upgradable from Obsidian. Can you add a config for each thing.

@Pilzinsel64
Copy link
Author

Pilzinsel64 commented Mar 5, 2024

Can you add a config for each thing

Sure.

@unicornbloods
Copy link

Thank you! ❤️

@Pilzinsel64
Copy link
Author

Pilzinsel64 commented Mar 5, 2024

Added another commit restoring the previous behavior regarding explosion safenes. Netherite can not be upgraded from anything else then obsidian.

If you still want to see configs for each upgrade and depending recipe, then I need some time the next days to find a good solution to keep that dynamic without hardcoding it (I don't like hardcoding things).

@unicornbloods
Copy link

It's no rush

@Pilzinsel64
Copy link
Author

Pilzinsel64 commented Mar 5, 2024

I now added a new config containing a string list with an iron-to-gold upgrade example:

    # Disallowed upgrades. All upgrades listed here will not be registred and no recipes will be generated for it.
    # Example: IRON:GOLD [default: ]
    S:blocklistUpgrades <
        IRON:GOLD
     >

If a upgrade is listed in this blacklist then there will no recipes generated for upgrading chest and the upgrade-items will not even be registred to the GameRegistry.

I hope that fits your needs. :)

I've chosen this way instead of the upgrade names directly to be able to handle upgrades also for chest recipes without the need to check the specific upgrade.

Copy link
Member

@Cleptomania Cleptomania left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good other than the one problem with dark steel upgrade items. Tested it inside and outside of GTNH pack and works as expected other than that.

@Pilzinsel64
Copy link
Author

Thank you a lot for your test and review @Cleptomania! I addressed your changes, this is again ready for review.

@Pilzinsel64 Pilzinsel64 requested a review from Cleptomania March 12, 2024 10:51
@Dream-Master Dream-Master merged commit 394d2e7 into master Mar 12, 2024
1 check passed
@Dream-Master Dream-Master deleted the fix/re-organize-tiers branch March 12, 2024 14:21
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

Successfully merging this pull request may close these issues.

4 participants