-
Notifications
You must be signed in to change notification settings - Fork 120
Add ore generation (1.13 to 1.21.5) #142
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
Open
xpple
wants to merge
39
commits into
Cubitect:master
Choose a base branch
from
xpple:ore-generation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+1,218
−0
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
After ores the only logical next step was ore veins, so I have also added those to my fork. However, to prevent scope creep (ore veins do not depend on the biome at all, after all this is Cubiomes), I have decided not to include them in this PR. The code is quite short though and hasn't changed since 1.18, so if you think it fits I can always add it. |
**wow this should be add with gui |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds ore generation for Minecraft versions 1.13-1.21.5. There are a few cases where the results may be off. These are in places where the vanilla code relies on the terrain, which Cubiomes cannot simulate. How should we handle this? This applies especially in the nether and in caves, because there are a lot of air-exposed ore locations there.
The 1.13-1.17.1 code is mostly ported from SeedFinding/mc_feature_java.
NB: As you will undoubtedly realise, I am not a C programmer. Please excuse me if I didn't do certain things the most idiomatic way. Feel free to edit my branch if you deem necessary.
Example simplified usage (1.18+):
In reality, the game compiles a list of all viable ores given the biomes (in biome scale) in a 3x3 square of chunks around a central chunk. In order of the index, it then generates all ores, whilst respecting the replaceables and biome (at block scale) of each ore. A function that computes this could be added, but this implementation is meant to provide people with an entrypoint to do such things. As such I have not added it.
Would close Cubitect/cubiomes-viewer#323.