Skip to content

Make TradeOfferGenerator extend a BiFunction instead to handle 1.14 implementation. #2070

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

Merged
merged 1 commit into from
Dec 18, 2019

Conversation

i509VCB
Copy link
Contributor

@i509VCB i509VCB commented Dec 17, 2019

This is to compensate for 1.14 now requiring a Merchant to call VillagerTrades$ITrade#getOffer(Entity, Random) since some Villagers such as the Cartographer Villager require access to the world from the entity to find a Woodland Mansion or a Monument.

This here is part of the changes with SpongePowered/Sponge#2434

…ffer> instead of a Function<Random, TradeOffer>.

This is to compensate for 1.14 now requiring a Merchant to call VillagerTrades$ITrade#getOffer(Entity, Random) since some Villagers such as the Cartogrpher Villager require access to the world from the entity to find a Woodland Mansion or a Monument.
@liach
Copy link
Contributor

liach commented Dec 18, 2019

Is this used as a bifunction so often that it must implement BiFunction? Or is it used rarely enough that a method reference that convert it to a bifunction suffices?

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.

3 participants