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

Add nether biomes API #496

Merged
merged 17 commits into from Feb 10, 2020
Merged

Add nether biomes API #496

merged 17 commits into from Feb 10, 2020

Conversation

jaskarth
Copy link
Contributor

@jaskarth jaskarth commented Feb 7, 2020

Add a new class and mixin to allow modders to inject their own biomes into the nether in a compatible manner.

Copy link
Contributor

@coderbot16 coderbot16 left a comment

Choose a reason for hiding this comment

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

Some easy fixes.

@liach liach added enhancement New feature or request reviews needed This PR needs more reviews labels Feb 8, 2020
import org.spongepowered.asm.mixin.injection.ModifyArg;
import org.spongepowered.asm.mixin.injection.Redirect;

import net.minecraft.class_4767;
Copy link
Contributor

Choose a reason for hiding this comment

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

Unused import

@liach liach requested review from a team and liach February 8, 2020 02:51
Copy link
Contributor

@coderbot16 coderbot16 left a comment

Choose a reason for hiding this comment

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

One final review, I promise! I think we should just clarify to API users what settings they need to tweak.

private NetherBiomes() { }

/**
* Adds a biome to the Nether generator. Biomes must set their own noise generation values in the biome settings class.
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps elaborate on which settings and have a {@link Biome.Settings} as well

Copy link
Contributor

Choose a reason for hiding this comment

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

Need to detail that you need to set up the biome noise in settings properly or the biomes have literally zero chance to generate in the nether

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think i will add some basic information and then write some detailed explanation on the wiki

Copy link
Contributor

@liach liach left a comment

Choose a reason for hiding this comment

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

Build passes. Style is good.

@coderbot16
Copy link
Contributor

@Earthcomputer can we get a second review from you? Just want to clean up the reviews list :p

Co-Authored-By: coderbot16 <coderbot16@gmail.com>
Co-Authored-By: Juuxel <6596629+Juuxel@users.noreply.github.com>
@coderbot16
Copy link
Contributor

I think this is ready for a final review from Player/modmuss. Can @Juuxel give this another look?

@coderbot16
Copy link
Contributor

coderbot16 commented Feb 8, 2020

Almost forgot, we should probably increment the version number to 0.2.0. I'm not sure how this will interact with #491, or if we'll need to bump it to 0.3.0 in the other PR.

@Prospector
Copy link
Contributor

Bump to 0.2.0 in both and unless they're merged at the same time, bump the one that was merged last to 0.3.0

@Prospector Prospector added last call If you care, make yourself heard right away! and removed reviews needed This PR needs more reviews labels Feb 8, 2020
/**
* API that exposes the internals of Minecraft's nether biome code.
*/
public class NetherBiomes {
Copy link
Contributor

Choose a reason for hiding this comment

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

Everywhere else in API (afaik) this class would be an interface with an INSTANCE field that NetherBiomesImpl implements (see e.g. net.fabricmc.fabric.api.client.model.ModelLoadingRegistry.) Why is this different here?

Not that it makes any real difference, but it would be more consistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to be consistent with the rest of the biome API which follows the same pattern that I used.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, yeah I didn't even notice we did the OverworldBiomes one any differently. Also I noticed in OverworldBiomes we had the class as final, maybe put that here too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, if this style exists somewhere previously in API, then fair enough.

/**
* Sets for internal use only! Stores data that is used by the Nether dimension mixin.
*/
public final class NetherBiomesImpl {
Copy link
Member

Choose a reason for hiding this comment

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

Why make this a class and not add it to InternalBiomeData?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is a great question if i'm being honest

@modmuss50
Copy link
Member

Module also needs to be marked to only run on 1.16+ versions

add 1.16 dependency, merge NetherBiomesImpl into InternalBiomeData, fix code style, and fix mixin target
Copy link
Member

@modmuss50 modmuss50 left a comment

Choose a reason for hiding this comment

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

Implement #499 and then I think this is good to merge.

@modmuss50 modmuss50 merged commit b7436cc into FabricMC:1.16 Feb 10, 2020
ThalusA pushed a commit to ThalusA/fabric that referenced this pull request May 31, 2022
* Add nether biomes API

* Update fabric-biomes-v1.mixins.json

* fixed license

* smarter injection point

* Apply suggestions from coderbot's review

Co-Authored-By: coderbot16 <coderbot16@gmail.com>

* fix code style

* remove redundant import

* improve docs and update yarn version

* Apply suggestions from code review

Co-Authored-By: coderbot16 <coderbot16@gmail.com>
Co-Authored-By: Juuxel <6596629+Juuxel@users.noreply.github.com>

* bump version

* mark classes as final

* Changes from modmuss's review

add 1.16 dependency, merge NetherBiomesImpl into InternalBiomeData, fix code style, and fix mixin target

* Update build.gradle

* Update API to inform users that it is experimental

* remove beta annotion

* optimize imports

Co-authored-by: coderbot16 <coderbot16@gmail.com>
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request last call If you care, make yourself heard right away!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet