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 a biome villager types data map to replace VillagerType#BY_BIOME #1879

Merged
merged 3 commits into from
Feb 2, 2025

Conversation

Matyrobbrt
Copy link
Member

@Matyrobbrt Matyrobbrt commented Jan 20, 2025

This PR adds a neoforge:villager_types biome data map to replace VillagerType#BY_BIOME, allowing mods to change the type of the villagers spawned in their own biomes.

To avoid a sudden breaking change, the map will still be used for now, but the fallback to it will be removed in 1.22.

See #1875 for context of making this PR.

This PR adds a `neoforge:biome_villagers` biome data map to replace `VillagerType#BY_BIOME`, allowing mods to change the type of the villagers spawned in their own biomes.

To avoid a sudden breaking change, the map will still be used for now, but the fallback to it will be removed in 1.22.
@Matyrobbrt Matyrobbrt added enhancement New (or improvement to existing) feature or request data driven This request involves a data driven system labels Jan 20, 2025
@neoforged-automation neoforged-automation bot added the 1.21.4 Targeted at Minecraft 1.21.4 label Jan 20, 2025
@neoforged-pr-publishing
Copy link

neoforged-pr-publishing bot commented Jan 20, 2025

  • Publish PR to GitHub Packages

Last commit published: aa5a0889d9e2b118cde82f38d6eb3e81fd2414b1.

PR Publishing

The artifacts published by this PR:

Repository Declaration

In order to use the artifacts published by the PR, add the following repository to your buildscript:

repositories {
    maven {
        name 'Maven for PR #1879' // https://github.com/neoforged/NeoForge/pull/1879
        url 'https://prmaven.neoforged.net/NeoForge/pr1879'
        content {
            includeModule('net.neoforged', 'neoforge')
            includeModule('net.neoforged', 'testframework')
        }
    }
}

MDK installation

In order to setup a MDK using the latest PR version, run the following commands in a terminal.
The script works on both *nix and Windows as long as you have the JDK bin folder on the path.
The script will clone the MDK in a folder named NeoForge-pr1879.
On Powershell you will need to remove the -L flag from the curl invocation.

mkdir NeoForge-pr1879
cd NeoForge-pr1879
curl -L https://prmaven.neoforged.net/NeoForge/pr1879/net/neoforged/neoforge/21.4.79-beta-pr-1879-biome-villagers-data-map/mdk-pr1879.zip -o mdk.zip
jar xf mdk.zip
rm mdk.zip || del mdk.zip

To test a production environment, you can download the installer from here.

Copy link
Contributor

@JT122406 JT122406 left a comment

Choose a reason for hiding this comment

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

Looks good I would just add somewhere stating the default value is plains villager type so people can easily see that

@Matyrobbrt Matyrobbrt marked this pull request as draft January 21, 2025 20:41
@Matyrobbrt Matyrobbrt changed the title Add a biome villagers data map to replace VillagerType#BY_BIOME Add a biome villager types data map to replace VillagerType#BY_BIOME Jan 24, 2025
@Matyrobbrt Matyrobbrt marked this pull request as ready for review January 24, 2025 11:11
@JT122406
Copy link
Contributor

Any movement on this?

@Matyrobbrt Matyrobbrt merged commit 8da2168 into neoforged:1.21.x Feb 2, 2025
6 checks passed
@Matyrobbrt Matyrobbrt deleted the biome-villagers-data-map branch February 2, 2025 19:37
@Matyrobbrt
Copy link
Member Author

@neoforged/bots backport 1.21.1

@neoforged-automation
Copy link

Backporting to 1.21.1...

@neoforged-automation
Copy link

@Matyrobbrt backport to 1.21.1 failed.

Click for failure reason

Command 'git apply --ignore-whitespace --recount -C0 __diff' failed execution with error: error: patch failed: src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeDataMapsProvider.java:24
error: src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeDataMapsProvider.java: patch does not apply

https://github.com/neoforged/PRActionRunner/actions/runs/13101887154

@neoforged-releases
Copy link

🚀 This PR has been released as NeoForge version 21.4.79-beta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.21.4 Targeted at Minecraft 1.21.4 data driven This request involves a data driven system enhancement New (or improvement to existing) feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants