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

[fix] Biome modification system #203

Merged
merged 3 commits into from Dec 28, 2022

Conversation

lonefelidae16
Copy link
Contributor

@lonefelidae16 lonefelidae16 commented Dec 26, 2022

fix #201

  • update Bedrockify.java

    • introduced new method init() to call DyingTrees.registerTrees() when saved
      edit: Should NOT do that; may produce OutOfMemory.
  • update DyingTrees.java

    • field VINE_DECORATOR is need to be registered
    • add branch that calls addFeature() or removeFeature() based on settings

* update `Bedrockify.java`
  - new method `init()` to call `DyingTrees.registerTrees()` when saved

* update `DyingTrees.java`
  - constant `VINE_DECORATOR` is need to be registered
  - add branch that calls `addFeature()` or `removeFeature()` based on settings
@lonefelidae16
Copy link
Contributor Author

I don’t like the bool check on each line, so I will refactor it in the future.

* new record class `BiomeDecorator`
  - holds `Predicate<BiomeSelectionContext>` and `List<RegistryKey<PlacedFeature>>`

* BiomeModifiers are now constants
  - `DYING_TREE_DECORATORS` and `FALLEN_TREE_DECORATORS`
* revert `Bedrockify.java`
  - register BiomeModification only once to avoid memory leak
@lonefelidae16 lonefelidae16 marked this pull request as ready for review December 26, 2022 10:17
@lonefelidae16
Copy link
Contributor Author

lonefelidae16 commented Dec 26, 2022

Perhaps it has been fixed. I’ll leave the environments and procedures.

  • Windows 11 - Minecraft 1.19.3 with Fabric loader 0.14.11

  • Ubuntu 22.04 - Minecraft 1.19.3 with Fabric loader 0.14.12

Case 01

  1. Launch Minecraft.
  2. Turn OFF Enable Dying Trees and Enable Fallen Trees in Bedrockify settings screen.
  3. Exit the game.
  4. Relaunch Minecraft again.
  5. Play or create Singleplayer world without any errors.

Case 02

  1. Launch Minecraft.
  2. Turn ON Enable Dying Trees and Enable Fallen Trees in Bedrockify settings screen.
  3. Create a new Singleplayer world.
  4. Find and remember the coordinates where the Dying tree and Fallen tree are located. F3 key is useful.
  5. Save and quit the world.
  6. Turn OFF Enable Dying Trees and Enable Fallen Trees.
  7. Re-create the world using the same seed value.
  8. Locate the coordinates and make sure that the Dying tree and Fallen tree are not generated.

@juancarloscp52
Copy link
Owner

Hello! Works really well. Also really good implementation for the fix, thanks! <3

@juancarloscp52 juancarloscp52 merged commit 82f1a43 into juancarloscp52:1.19.3 Dec 28, 2022
@lonefelidae16 lonefelidae16 deleted the fix/world-gen branch December 28, 2022 10:09
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.

None yet

2 participants