From 6220debfa5b6347a5e5aa0831923fd3a9d08d183 Mon Sep 17 00:00:00 2001 From: Matyrobbrt Date: Fri, 9 Aug 2024 12:22:56 +0300 Subject: [PATCH 1/3] Document the waxables and oxidizables data maps --- docs/resources/server/datamaps/builtin.md | 55 ++++++++++++++++++++++- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/docs/resources/server/datamaps/builtin.md b/docs/resources/server/datamaps/builtin.md index 47e71fda..420f7bf1 100644 --- a/docs/resources/server/datamaps/builtin.md +++ b/docs/resources/server/datamaps/builtin.md @@ -9,7 +9,9 @@ Allows configuring composter values, as a replacement for `ComposterBlock.COMPOS ```json5 { // A 0 to 1 (inclusive) float representing the chance that the item will update the level of the composter - "chance": 1 + "chance": 1, + // Optional, defaults to false - whether farmer villagers can compost this item + "can_villager_compost": false } ``` @@ -98,6 +100,32 @@ Example: } ``` +## `neoforge:oxidizables` +Allows configuring oxidation stages, as a replacement for `WeatheringCopper#NEXT_BY_BLOCK` (which will be ignored in 1.21.2). This data map is also used to build a reverse deoxidation map (for scraping with an axe). It is located at `neoforge/data_maps/block/oxidizables.json` and its objects have the following structure: +```json5 +{ + // The block this block will turn into once oxidized + "next_oxidized_stage": "examplemod:oxidized_block" +} +``` + +:::note +Custom blocks must implement `WeatheringCopperFullBlock` or `WeatheringCopper` and call `changeOverTime` in `randomTick` to oxidize naturally. +::: + +Example: + +```json5 +{ + "values": { + "mymod:custom_copper": { + // Make a custom copper block oxidize into custom oxidized copper + "next_oxidized_stage": "mymod:custom_oxidized_copper" + } + } +} +``` + ## `neoforge:parrot_imitations` Allows configuring the sounds produced by parrots when they want to imitate a mob, as a replacement for `Parrot#MOB_SOUND_MAP` (which is now ignored). This data map is located at `neoforge/data_maps/entity_type/parrot_imitations.json` and its objects have the following structure: @@ -141,7 +169,7 @@ Example: "minecraft:armorer": { // Make armorers give the raid hero the armorer gift loot table "loot_table": "minecraft:gameplay/hero_of_the_village/armorer_gift" - }, + } } } ``` @@ -170,5 +198,28 @@ Example: } ``` +## `neoforge:waxables` +Allows configuring the block a block will turn into when waxed (right clicked with a honeycomb), as a replacement for `HoneycombItem#WAXABLES` (which will be ignored in 1.21.2). This data map is also used to build a reverse dewaxing map (for scraping with an axe). It is located at `neoforge/data_maps/block/waxables.json` and its objects have the following structure: + +```json5 +{ + // The waxed variant of this block + "waxed": "minecraft:iron_block" +} +``` + +Example: + +```json5 +{ + "values": { + // Make gold blocks turn into iron blocks once waxed + "minecraft:gold_block": { + "waxed": "minecraft:iron_block" + } + } +} +``` + [datacomponent]: ../../../items/datacomponents.md [datamap]: index.md From 804d3071a493c7a8accc0ad64eaf9ae565f2b46a Mon Sep 17 00:00:00 2001 From: Matyrobbrt <65940752+Matyrobbrt@users.noreply.github.com> Date: Fri, 9 Aug 2024 15:06:43 +0300 Subject: [PATCH 2/3] Apply suggestions from code review --- docs/resources/server/datamaps/builtin.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/resources/server/datamaps/builtin.md b/docs/resources/server/datamaps/builtin.md index 420f7bf1..aba9c085 100644 --- a/docs/resources/server/datamaps/builtin.md +++ b/docs/resources/server/datamaps/builtin.md @@ -101,6 +101,7 @@ Example: ``` ## `neoforge:oxidizables` + Allows configuring oxidation stages, as a replacement for `WeatheringCopper#NEXT_BY_BLOCK` (which will be ignored in 1.21.2). This data map is also used to build a reverse deoxidation map (for scraping with an axe). It is located at `neoforge/data_maps/block/oxidizables.json` and its objects have the following structure: ```json5 { @@ -199,6 +200,7 @@ Example: ``` ## `neoforge:waxables` + Allows configuring the block a block will turn into when waxed (right clicked with a honeycomb), as a replacement for `HoneycombItem#WAXABLES` (which will be ignored in 1.21.2). This data map is also used to build a reverse dewaxing map (for scraping with an axe). It is located at `neoforge/data_maps/block/waxables.json` and its objects have the following structure: ```json5 From 3932872cdeff7fca78830b668e49ff6e407efaf3 Mon Sep 17 00:00:00 2001 From: Matyrobbrt <65940752+Matyrobbrt@users.noreply.github.com> Date: Sun, 11 Aug 2024 23:08:22 +0300 Subject: [PATCH 3/3] Update builtin.md --- docs/resources/server/datamaps/builtin.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/resources/server/datamaps/builtin.md b/docs/resources/server/datamaps/builtin.md index aba9c085..b0a223a3 100644 --- a/docs/resources/server/datamaps/builtin.md +++ b/docs/resources/server/datamaps/builtin.md @@ -103,6 +103,7 @@ Example: ## `neoforge:oxidizables` Allows configuring oxidation stages, as a replacement for `WeatheringCopper#NEXT_BY_BLOCK` (which will be ignored in 1.21.2). This data map is also used to build a reverse deoxidation map (for scraping with an axe). It is located at `neoforge/data_maps/block/oxidizables.json` and its objects have the following structure: + ```json5 { // The block this block will turn into once oxidized