-
Notifications
You must be signed in to change notification settings - Fork 1
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
Implement NOVA-Worldgen #1
Conversation
TODO: Wrappers
EnumSelector will be removed if NOVA-Team/NOVA-Monorepo#232 is merged.
// DEEPERER = 20 (15-25) | ||
// REALLYDEEP = 10 (5-15) | ||
|
||
if (ore.oreLayers.allows(OreHeight.SURFACE)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. That's a loop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed now
oreHeightMap.put(j++, OreHeight.REALLYDEEP); | ||
Iterator<OreHeight> iterator = Arrays.stream(OreHeight.values()).filter(ore.oreLayers::allows).iterator(); | ||
|
||
for (OreHeight height = iterator.next(); iterator.hasNext();) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.forEach
on the stream?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed now.
The main reason I did it that way initially, is because I made use of the local variable j
, which must be final or effectively final to be used in lambda expressions.
Reason: Consistency with already implemented wrappers
Reason: Worldgen is not just ores.
Additional changes: OreGenerationRegistry was replaced with Registry<Ore>, as it was redundant.
This PR contains my implementation of NOVA-Worldgen wrappers and WorldManager.
Depends on NOVA-Team/NOVA-Monorepo#229, NOVA-Team/NOVA-Monorepo#231 and NOVA-Team/NOVA-Monorepo#232.
To do list:
Implement(Leave that for another PR)WorldInfo
Completed:
WorldgenManager
dependency injection