From feb80270cf7f65fe969eefb38bb3b04e196a43be Mon Sep 17 00:00:00 2001 From: TelepathicGrunt <40846040+TelepathicGrunt@users.noreply.github.com> Date: Tue, 15 Oct 2024 11:58:15 -0400 Subject: [PATCH 1/2] Add `c:experience` fluid tag with javadoc for standard conversion rate (#1573) --- .../resources/assets/c/lang/en_us.json | 1 + .../data/c/tags/fluid/experience.json | 3 ++ .../common/TagConventionLogWarning.java | 2 ++ .../net/neoforged/neoforge/common/Tags.java | 30 +++++++++++++------ .../internal/NeoForgeFluidTagsProvider.java | 1 + .../internal/NeoForgeLanguageProvider.java | 1 + 6 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 src/generated/resources/data/c/tags/fluid/experience.json diff --git a/src/generated/resources/assets/c/lang/en_us.json b/src/generated/resources/assets/c/lang/en_us.json index 626b385a89..cf6783aeb8 100644 --- a/src/generated/resources/assets/c/lang/en_us.json +++ b/src/generated/resources/assets/c/lang/en_us.json @@ -128,6 +128,7 @@ "tag.entity_type.c.minecarts": "Minecarts", "tag.entity_type.c.teleporting_not_supported": "Teleporting Not Supported", "tag.fluid.c.beetroot_soup": "Beetroot Soup", + "tag.fluid.c.experience": "Experience", "tag.fluid.c.gaseous": "Gaseous", "tag.fluid.c.hidden_from_recipe_viewers": "Hidden From Recipe Viewers", "tag.fluid.c.honey": "Honey", diff --git a/src/generated/resources/data/c/tags/fluid/experience.json b/src/generated/resources/data/c/tags/fluid/experience.json new file mode 100644 index 0000000000..f72d209df7 --- /dev/null +++ b/src/generated/resources/data/c/tags/fluid/experience.json @@ -0,0 +1,3 @@ +{ + "values": [] +} \ No newline at end of file diff --git a/src/main/java/net/neoforged/neoforge/common/TagConventionLogWarning.java b/src/main/java/net/neoforged/neoforge/common/TagConventionLogWarning.java index 8802212cbf..854a826426 100644 --- a/src/main/java/net/neoforged/neoforge/common/TagConventionLogWarning.java +++ b/src/main/java/net/neoforged/neoforge/common/TagConventionLogWarning.java @@ -420,6 +420,8 @@ public enum LogWarningMode { createForgeMapEntry(Registries.FLUID, "milk", Tags.Fluids.MILK), createForgeMapEntry(Registries.FLUID, "gaseous", Tags.Fluids.GASEOUS), createForgeMapEntry(Registries.FLUID, "honey", Tags.Fluids.HONEY), + createForgeMapEntry(Registries.FLUID, "xp", Tags.Fluids.EXPERIENCE), + createForgeMapEntry(Registries.FLUID, "experience", Tags.Fluids.EXPERIENCE), createForgeMapEntry(Registries.FLUID, "potion", Tags.Fluids.POTION), createForgeMapEntry(Registries.FLUID, "plantoil", "plant_oil"), diff --git a/src/main/java/net/neoforged/neoforge/common/Tags.java b/src/main/java/net/neoforged/neoforge/common/Tags.java index c4dfe263b7..9a39ba84a9 100644 --- a/src/main/java/net/neoforged/neoforge/common/Tags.java +++ b/src/main/java/net/neoforged/neoforge/common/Tags.java @@ -768,12 +768,12 @@ private static TagKey neoforgeTag(String name) { */ public static class Fluids { /** - * Holds all fluids related to water. + * Holds all fluids related to water.

* This tag is done to help out multi-loader mods/datapacks where the vanilla water tag has attached behaviors outside Neo. */ public static final TagKey WATER = tag("water"); /** - * Holds all fluids related to lava. + * Holds all fluids related to lava.

* This tag is done to help out multi-loader mods/datapacks where the vanilla lava tag has attached behaviors outside Neo. */ public static final TagKey LAVA = tag("lava"); @@ -786,36 +786,48 @@ public static class Fluids { */ public static final TagKey GASEOUS = tag("gaseous"); /** - * Holds all fluids related to honey.

+ * Holds all fluids related to honey. + *

* (Standard unit for honey bottle is 250mb per bottle) */ public static final TagKey HONEY = tag("honey"); /** - * Holds all fluids related to potions. The effects of the potion fluid should be read from NBT. + * Holds all fluids related to experience. + *

+ * (Standard unit for experience is 20mb per 1 experience. However, extraction from Bottle o' Enchanting should yield 250mb while smashing yields less) + */ + public static final TagKey EXPERIENCE = tag("experience"); + /** + * Holds all fluids related to potions. The effects of the potion fluid should be read from DataComponents. * The effects and color of the potion fluid should be read from {@link net.minecraft.core.component.DataComponents#POTION_CONTENTS} - * component that people should be attaching to the fluidstack of this fluid.

+ * component that people should be attaching to the fluidstack of this fluid. + *

* (Standard unit for potions is 250mb per bottle) */ public static final TagKey POTION = tag("potion"); /** * Holds all fluids related to Suspicious Stew. * The effects of the suspicious stew fluid should be read from {@link net.minecraft.core.component.DataComponents#SUSPICIOUS_STEW_EFFECTS} - * component that people should be attaching to the fluidstack of this fluid.

+ * component that people should be attaching to the fluidstack of this fluid. + *

* (Standard unit for suspicious stew is 250mb per bowl) */ public static final TagKey SUSPICIOUS_STEW = tag("suspicious_stew"); /** - * Holds all fluids related to Mushroom Stew.

+ * Holds all fluids related to Mushroom Stew. + *

* (Standard unit for mushroom stew is 250mb per bowl) */ public static final TagKey MUSHROOM_STEW = tag("mushroom_stew"); /** - * Holds all fluids related to Rabbit Stew.

+ * Holds all fluids related to Rabbit Stew. + *

* (Standard unit for rabbit stew is 250mb per bowl) */ public static final TagKey RABBIT_STEW = tag("rabbit_stew"); /** - * Holds all fluids related to Beetroot Soup.

+ * Holds all fluids related to Beetroot Soup. + *

* (Standard unit for beetroot soup is 250mb per bowl) */ public static final TagKey BEETROOT_SOUP = tag("beetroot_soup"); diff --git a/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeFluidTagsProvider.java b/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeFluidTagsProvider.java index 880ebada1d..5d96ec98ba 100644 --- a/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeFluidTagsProvider.java +++ b/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeFluidTagsProvider.java @@ -29,6 +29,7 @@ public void addTags(HolderLookup.Provider lookupProvider) { tag(Fluids.MILK).addOptional(NeoForgeMod.MILK.getId()).addOptional(NeoForgeMod.FLOWING_MILK.getId()); tag(Fluids.GASEOUS); tag(Fluids.HONEY); + tag(Fluids.EXPERIENCE); tag(Fluids.POTION); tag(Fluids.SUSPICIOUS_STEW); tag(Fluids.MUSHROOM_STEW); diff --git a/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeLanguageProvider.java b/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeLanguageProvider.java index f8cb9f9f26..e63397cdcb 100644 --- a/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeLanguageProvider.java +++ b/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeLanguageProvider.java @@ -345,6 +345,7 @@ protected void addTranslations() { add(Tags.Fluids.MILK, "Milk"); add(Tags.Fluids.GASEOUS, "Gaseous"); add(Tags.Fluids.HONEY, "Honey"); + add(Tags.Fluids.EXPERIENCE, "Experience"); add(Tags.Fluids.POTION, "Potion"); add(Tags.Fluids.SUSPICIOUS_STEW, "Suspicious Stew"); add(Tags.Fluids.MUSHROOM_STEW, "Mushroom Stew"); From 8450a90c52f3bd8b5f4d48f159d34e359ab2af7f Mon Sep 17 00:00:00 2001 From: IThundxr Date: Tue, 15 Oct 2024 11:58:24 -0400 Subject: [PATCH 2/2] Add Stripped Logs and Stripped Woods Tags (#1584) --- src/generated/resources/assets/c/lang/en_us.json | 4 ++++ .../resources/data/c/tags/block/stripped_logs.json | 13 +++++++++++++ .../resources/data/c/tags/block/stripped_woods.json | 12 ++++++++++++ .../resources/data/c/tags/item/stripped_logs.json | 13 +++++++++++++ .../resources/data/c/tags/item/stripped_woods.json | 12 ++++++++++++ .../java/net/neoforged/neoforge/common/Tags.java | 4 ++++ .../data/internal/NeoForgeBlockTagsProvider.java | 8 ++++++++ .../data/internal/NeoForgeItemTagsProvider.java | 2 ++ .../data/internal/NeoForgeLanguageProvider.java | 4 ++++ 9 files changed, 72 insertions(+) create mode 100644 src/generated/resources/data/c/tags/block/stripped_logs.json create mode 100644 src/generated/resources/data/c/tags/block/stripped_woods.json create mode 100644 src/generated/resources/data/c/tags/item/stripped_logs.json create mode 100644 src/generated/resources/data/c/tags/item/stripped_woods.json diff --git a/src/generated/resources/assets/c/lang/en_us.json b/src/generated/resources/assets/c/lang/en_us.json index cf6783aeb8..3c27e29b49 100644 --- a/src/generated/resources/assets/c/lang/en_us.json +++ b/src/generated/resources/assets/c/lang/en_us.json @@ -110,6 +110,8 @@ "tag.block.c.storage_blocks.redstone": "Redstone Storage Blocks", "tag.block.c.storage_blocks.slime": "Slime Storage Blocks", "tag.block.c.storage_blocks.wheat": "Wheat Storage Blocks", + "tag.block.c.stripped_logs": "Stripped Logs", + "tag.block.c.stripped_woods": "Stripped Woods", "tag.block.c.villager_job_sites": "Villager Job Sites", "tag.block.neoforge.enderman_place_on_blacklist": "Enderman Place On Blacklist", "tag.block.neoforge.needs_gold_tool": "Needs Gold Tools", @@ -348,6 +350,8 @@ "tag.item.c.storage_blocks.slime": "Slime Storage Blocks", "tag.item.c.storage_blocks.wheat": "Wheat Storage Blocks", "tag.item.c.strings": "Strings", + "tag.item.c.stripped_logs": "Stripped Log Blocks", + "tag.item.c.stripped_woods": "Stripped Wood Blocks", "tag.item.c.tools": "Tools", "tag.item.c.tools.bow": "Bows", "tag.item.c.tools.brush": "Brushes", diff --git a/src/generated/resources/data/c/tags/block/stripped_logs.json b/src/generated/resources/data/c/tags/block/stripped_logs.json new file mode 100644 index 0000000000..ae69c996ad --- /dev/null +++ b/src/generated/resources/data/c/tags/block/stripped_logs.json @@ -0,0 +1,13 @@ +{ + "values": [ + "minecraft:stripped_acacia_log", + "minecraft:stripped_bamboo_block", + "minecraft:stripped_birch_log", + "minecraft:stripped_cherry_log", + "minecraft:stripped_dark_oak_log", + "minecraft:stripped_jungle_log", + "minecraft:stripped_mangrove_log", + "minecraft:stripped_oak_log", + "minecraft:stripped_spruce_log" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/c/tags/block/stripped_woods.json b/src/generated/resources/data/c/tags/block/stripped_woods.json new file mode 100644 index 0000000000..197542891d --- /dev/null +++ b/src/generated/resources/data/c/tags/block/stripped_woods.json @@ -0,0 +1,12 @@ +{ + "values": [ + "minecraft:stripped_acacia_wood", + "minecraft:stripped_birch_wood", + "minecraft:stripped_cherry_wood", + "minecraft:stripped_dark_oak_wood", + "minecraft:stripped_jungle_wood", + "minecraft:stripped_mangrove_wood", + "minecraft:stripped_oak_wood", + "minecraft:stripped_spruce_wood" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/c/tags/item/stripped_logs.json b/src/generated/resources/data/c/tags/item/stripped_logs.json new file mode 100644 index 0000000000..ae69c996ad --- /dev/null +++ b/src/generated/resources/data/c/tags/item/stripped_logs.json @@ -0,0 +1,13 @@ +{ + "values": [ + "minecraft:stripped_acacia_log", + "minecraft:stripped_bamboo_block", + "minecraft:stripped_birch_log", + "minecraft:stripped_cherry_log", + "minecraft:stripped_dark_oak_log", + "minecraft:stripped_jungle_log", + "minecraft:stripped_mangrove_log", + "minecraft:stripped_oak_log", + "minecraft:stripped_spruce_log" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/c/tags/item/stripped_woods.json b/src/generated/resources/data/c/tags/item/stripped_woods.json new file mode 100644 index 0000000000..197542891d --- /dev/null +++ b/src/generated/resources/data/c/tags/item/stripped_woods.json @@ -0,0 +1,12 @@ +{ + "values": [ + "minecraft:stripped_acacia_wood", + "minecraft:stripped_birch_wood", + "minecraft:stripped_cherry_wood", + "minecraft:stripped_dark_oak_wood", + "minecraft:stripped_jungle_wood", + "minecraft:stripped_mangrove_wood", + "minecraft:stripped_oak_wood", + "minecraft:stripped_spruce_wood" + ] +} \ No newline at end of file diff --git a/src/main/java/net/neoforged/neoforge/common/Tags.java b/src/main/java/net/neoforged/neoforge/common/Tags.java index 9a39ba84a9..8a57785dc8 100644 --- a/src/main/java/net/neoforged/neoforge/common/Tags.java +++ b/src/main/java/net/neoforged/neoforge/common/Tags.java @@ -224,6 +224,8 @@ public static class Blocks { public static final TagKey STORAGE_BLOCKS_REDSTONE = tag("storage_blocks/redstone"); public static final TagKey STORAGE_BLOCKS_SLIME = tag("storage_blocks/slime"); public static final TagKey STORAGE_BLOCKS_WHEAT = tag("storage_blocks/wheat"); + public static final TagKey STRIPPED_LOGS = tag("stripped_logs"); + public static final TagKey STRIPPED_WOODS = tag("stripped_woods"); public static final TagKey VILLAGER_JOB_SITES = tag("villager_job_sites"); /** @@ -627,6 +629,8 @@ public static class Items { public static final TagKey STORAGE_BLOCKS_SLIME = tag("storage_blocks/slime"); public static final TagKey STORAGE_BLOCKS_WHEAT = tag("storage_blocks/wheat"); public static final TagKey STRINGS = tag("strings"); + public static final TagKey STRIPPED_LOGS = tag("stripped_logs"); + public static final TagKey STRIPPED_WOODS = tag("stripped_woods"); public static final TagKey VILLAGER_JOB_SITES = tag("villager_job_sites"); // Tools and Armors diff --git a/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeBlockTagsProvider.java b/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeBlockTagsProvider.java index 8a689441d4..ca4fde00ba 100644 --- a/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeBlockTagsProvider.java +++ b/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeBlockTagsProvider.java @@ -144,6 +144,14 @@ public void addTags(HolderLookup.Provider p_256380_) { tag(Tags.Blocks.STORAGE_BLOCKS_REDSTONE).add(Blocks.REDSTONE_BLOCK); tag(Tags.Blocks.STORAGE_BLOCKS_SLIME).add(Blocks.SLIME_BLOCK); tag(Tags.Blocks.STORAGE_BLOCKS_WHEAT).add(Blocks.HAY_BLOCK); + tag(Tags.Blocks.STRIPPED_LOGS).add( + Blocks.STRIPPED_ACACIA_LOG, Blocks.STRIPPED_BAMBOO_BLOCK, Blocks.STRIPPED_BIRCH_LOG, + Blocks.STRIPPED_CHERRY_LOG, Blocks.STRIPPED_DARK_OAK_LOG, Blocks.STRIPPED_JUNGLE_LOG, + Blocks.STRIPPED_MANGROVE_LOG, Blocks.STRIPPED_OAK_LOG, Blocks.STRIPPED_SPRUCE_LOG); + tag(Tags.Blocks.STRIPPED_WOODS).add( + Blocks.STRIPPED_ACACIA_WOOD, Blocks.STRIPPED_BIRCH_WOOD, Blocks.STRIPPED_CHERRY_WOOD, + Blocks.STRIPPED_DARK_OAK_WOOD, Blocks.STRIPPED_JUNGLE_WOOD, Blocks.STRIPPED_MANGROVE_WOOD, + Blocks.STRIPPED_OAK_WOOD, Blocks.STRIPPED_SPRUCE_WOOD); tag(Tags.Blocks.VILLAGER_JOB_SITES).add( Blocks.BARREL, Blocks.BLAST_FURNACE, Blocks.BREWING_STAND, Blocks.CARTOGRAPHY_TABLE, Blocks.CAULDRON, Blocks.WATER_CAULDRON, Blocks.LAVA_CAULDRON, Blocks.POWDER_SNOW_CAULDRON, diff --git a/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeItemTagsProvider.java b/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeItemTagsProvider.java index f683fa8a72..20e88b6501 100644 --- a/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeItemTagsProvider.java +++ b/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeItemTagsProvider.java @@ -250,6 +250,8 @@ public void addTags(HolderLookup.Provider lookupProvider) { copy(Tags.Blocks.STORAGE_BLOCKS_SLIME, Tags.Items.STORAGE_BLOCKS_SLIME); copy(Tags.Blocks.STORAGE_BLOCKS_WHEAT, Tags.Items.STORAGE_BLOCKS_WHEAT); tag(Tags.Items.STRINGS).add(Items.STRING); + copy(Tags.Blocks.STRIPPED_LOGS, Tags.Items.STRIPPED_LOGS); + copy(Tags.Blocks.STRIPPED_WOODS, Tags.Items.STRIPPED_WOODS); tag(Tags.Items.VILLAGER_JOB_SITES).add( Items.BARREL, Items.BLAST_FURNACE, Items.BREWING_STAND, Items.CARTOGRAPHY_TABLE, Items.CAULDRON, Items.COMPOSTER, Items.FLETCHING_TABLE, Items.GRINDSTONE, diff --git a/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeLanguageProvider.java b/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeLanguageProvider.java index e63397cdcb..f764016f5c 100644 --- a/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeLanguageProvider.java +++ b/src/main/java/net/neoforged/neoforge/common/data/internal/NeoForgeLanguageProvider.java @@ -125,6 +125,8 @@ protected void addTranslations() { add(Tags.Blocks.STORAGE_BLOCKS_REDSTONE, "Redstone Storage Blocks"); add(Tags.Blocks.STORAGE_BLOCKS_SLIME, "Slime Storage Blocks"); add(Tags.Blocks.STORAGE_BLOCKS_WHEAT, "Wheat Storage Blocks"); + add(Tags.Blocks.STRIPPED_LOGS, "Stripped Logs"); + add(Tags.Blocks.STRIPPED_WOODS, "Stripped Woods"); add(Tags.Blocks.VILLAGER_JOB_SITES, "Villager Job Sites"); add(Tags.Blocks.VILLAGER_FARMLANDS, "Villager Farmlands"); @@ -322,6 +324,8 @@ protected void addTranslations() { add(Tags.Items.STORAGE_BLOCKS_SLIME, "Slime Storage Blocks"); add(Tags.Items.STORAGE_BLOCKS_WHEAT, "Wheat Storage Blocks"); add(Tags.Items.STRINGS, "Strings"); + add(Tags.Items.STRIPPED_LOGS, "Stripped Log Blocks"); + add(Tags.Items.STRIPPED_WOODS, "Stripped Wood Blocks"); add(Tags.Items.VILLAGER_JOB_SITES, "Villager Job Sites"); add(Tags.Items.TOOLS_SHEAR, "Shears"); add(Tags.Items.TOOLS_SHIELD, "Shields");