Skip to content

Commit

Permalink
Add PlantType replacement work
Browse files Browse the repository at this point in the history
  • Loading branch information
TelepathicGrunt committed Jun 26, 2024
1 parent 7fae3b6 commit 1a331f0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions content/news/21.0release.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,16 @@ This method has been added to living entities in order to allow them to react to

We would like to thank [Caltinor](https://github.com/Caltinor) for their work on the [Pull Request](https://github.com/neoforged/NeoForge/pull/792), which you can consult for more information.

## PlantType system is now replaced (introduced in NeoForge 21.0.39-beta)

The original PlantType system was buggy and quite confusing to deal with. Instead, we deleted that system and added `SpecialPlantable` item interface, patched in a `canSustainPlant` block method, and added a `neoforge:villager_farmlands` block tag.

The `SpecialPlantable` interface allows mods to more easily tell if a modded item can spawn a plant and exposes methods for easy checking if a spot is valid for the item and to spawn the plant itself.

The patched-in `canSustainPlant` method allows blocks to forcibly sustain many plants and now works with all vanilla plants. Modded plants would need to call this method if the plant block override canSurvive without calling super.

And the `SpecialPlantable` block tag now lets Farmer Villagers detect and plant on modded blocks more easier. This can also be used by mods to know if a modded block is farmland-like.

## Experimental Gradle Plugin
We're currently developing a new experimental Gradle Plugin, focused on simpler buildscripts and improved caching. You can find information on its usage [here](https://github.com/NeoForged/ModDevGradle), and support is provided in the [thread](https://discord.com/channels/313125603924639766/1239579489617580072) on our [Discord server](https://discord.neoforged.net).

Expand Down

1 comment on commit 1a331f0

@neoforged-pages-deployments
Copy link

Choose a reason for hiding this comment

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

Deploying with Cloudflare Pages

Name Result
Last commit: 1a331f026add89f407e1b4a2d5cbe82906befe52
Status: ✅ Deploy successful!
Preview URL: https://6657f51f.neoforged-website-previews.pages.dev
PR Preview URL: https://pr-45.neoforged-website-previews.pages.dev

Please sign in to comment.