Skip to content

Commit

Permalink
Merge branch 'main' into ToolActionsRename
Browse files Browse the repository at this point in the history
  • Loading branch information
TelepathicGrunt committed Jun 26, 2024
2 parents 8d6e430 + d75b776 commit 6ce75e2
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions content/news/21.0release.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,18 @@ 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.

## ToolActions renamed to ItemAbilities (renamed in NeoForge 21.0.??-beta)
To help promote the usage of our `ToolActions` system, it hass been renamed to `ItemAbilities` to help show that it can be used for more than just tools and more than just representing actions. This system is a special alternative to tags for when mods need to do itemstack sensitive checks where an item can be in many different states and have different abilities. It is a good for cross-mod compatibility that is itemstack sensitive without needing to add compile-time dependencies. The NeoForge provided ItemAbilities for vanilla tools are still in place such as `shears_dig` to verify the itemstack used is supposed to allow shearing for modded stuff.
## 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.

## ToolActions renamed to ItemAbilities (renamed in NeoForge 21.0.40-beta)
To help promote the usage of our `ToolActions` system, it has been renamed to `ItemAbilities` to help show that it can be used for more than just tools and more than just representing actions. This system is a special alternative to tags for when mods need to do itemstack sensitive checks where an item can be in many different states and have different abilities. It is a good for cross-mod compatibility that is itemstack sensitive without needing to add compile-time dependencies. The NeoForge provided ItemAbilities for vanilla tools are still in place such as `shears_dig` to verify the itemstack used is supposed to allow shearing for modded stuff.

## 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 6ce75e2

@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: 6ce75e202edfcf61d8d7a703c4d73b23a7e30c03
Status: ✅ Deploy successful!
Preview URL: https://57a47b26.neoforged-website-previews.pages.dev
PR Preview URL: https://pr-44.neoforged-website-previews.pages.dev

Please sign in to comment.