mirror of
https://github.com/MinecraftForge/MinecraftForge
synced 2026-08-22 04:26:10 -04:00
Add more c fluid tags (#10137)
Replaces the existing `forge`-namespaced tags, which are now deprecated. Adds `c:experience`
This commit is contained in:
parent
618da273dc
commit
eb6c564ce4
10 changed files with 109 additions and 43 deletions
8
src/main/generated/data/c/tags/fluid/beetroot_soup.json
Normal file
8
src/main/generated/data/c/tags/fluid/beetroot_soup.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"values": [
|
||||
{
|
||||
"id": "#forge:beetroot_soup",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
||||
3
src/main/generated/data/c/tags/fluid/experience.json
Normal file
3
src/main/generated/data/c/tags/fluid/experience.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"values": []
|
||||
}
|
||||
8
src/main/generated/data/c/tags/fluid/gaseous.json
Normal file
8
src/main/generated/data/c/tags/fluid/gaseous.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"values": [
|
||||
{
|
||||
"id": "#forge:gaseous",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
||||
8
src/main/generated/data/c/tags/fluid/mushroom_stew.json
Normal file
8
src/main/generated/data/c/tags/fluid/mushroom_stew.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"values": [
|
||||
{
|
||||
"id": "#forge:mushroom_stew",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
||||
8
src/main/generated/data/c/tags/fluid/potion.json
Normal file
8
src/main/generated/data/c/tags/fluid/potion.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"values": [
|
||||
{
|
||||
"id": "#forge:potion",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
||||
8
src/main/generated/data/c/tags/fluid/rabbit_stew.json
Normal file
8
src/main/generated/data/c/tags/fluid/rabbit_stew.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"values": [
|
||||
{
|
||||
"id": "#forge:rabbit_stew",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"values": [
|
||||
{
|
||||
"id": "#forge:suspicious_stew",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -246,6 +246,12 @@ public final class TagConventionMappings {
|
|||
|
||||
//region Fluids
|
||||
legacyToCommon(Registries.FLUID, forgeRl("milk"), Tags.Fluids.MILK),
|
||||
legacyToCommon(Registries.FLUID, forgeRl("gaseous"), Tags.Fluids.GASEOUS),
|
||||
legacyToCommon(Registries.FLUID, forgeRl("potion"), Tags.Fluids.POTION),
|
||||
legacyToCommon(Registries.FLUID, forgeRl("suspicious_stew"), Tags.Fluids.SUSPICIOUS_STEW),
|
||||
legacyToCommon(Registries.FLUID, forgeRl("mushroom_stew"), Tags.Fluids.MUSHROOM_STEW),
|
||||
legacyToCommon(Registries.FLUID, forgeRl("rabbit_stew"), Tags.Fluids.RABBIT_STEW),
|
||||
legacyToCommon(Registries.FLUID, forgeRl("beetroot_soup"), Tags.Fluids.BEETROOT_SOUP),
|
||||
//endregion
|
||||
|
||||
//region Biomes
|
||||
|
|
|
|||
|
|
@ -1068,39 +1068,6 @@ public class Tags {
|
|||
private static void init() {}
|
||||
|
||||
//region `forge` tags for Forge-specific tags
|
||||
/**
|
||||
* Holds all fluids that are gaseous at room temperature.
|
||||
*/
|
||||
public static final TagKey<Fluid> GASEOUS = forgeTag("gaseous");
|
||||
/**
|
||||
* Holds all fluids related to potions. The effects of the potion fluid should be read from NBT.
|
||||
* 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.<br></br>
|
||||
* (Standard unit for potions is 250mb per bottle)
|
||||
*/
|
||||
public static final TagKey<Fluid> POTION = forgeTag("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.<br></br>
|
||||
* (Standard unit for suspicious stew is 250mb per bowl)
|
||||
*/
|
||||
public static final TagKey<Fluid> SUSPICIOUS_STEW = forgeTag("suspicious_stew");
|
||||
/**
|
||||
* Holds all fluids related to Mushroom Stew.<br></br>
|
||||
* (Standard unit for mushroom stew is 250mb per bowl)
|
||||
*/
|
||||
public static final TagKey<Fluid> MUSHROOM_STEW = forgeTag("mushroom_stew");
|
||||
/**
|
||||
* Holds all fluids related to Rabbit Stew.<br></br>
|
||||
* (Standard unit for rabbit stew is 250mb per bowl)
|
||||
*/
|
||||
public static final TagKey<Fluid> RABBIT_STEW = forgeTag("rabbit_stew");
|
||||
/**
|
||||
* Holds all fluids related to Beetroot Soup.<br></br>
|
||||
* (Standard unit for beetroot soup is 250mb per bowl)
|
||||
*/
|
||||
public static final TagKey<Fluid> BEETROOT_SOUP = forgeTag("beetroot_soup");
|
||||
//endregion
|
||||
|
||||
//region `c` tags for common conventions
|
||||
|
|
@ -1120,11 +1087,50 @@ public class Tags {
|
|||
* Holds all fluids related to milk.
|
||||
*/
|
||||
public static final TagKey<Fluid> MILK = cTag("milk");
|
||||
/**
|
||||
* Holds all fluids that are gaseous at room temperature.
|
||||
*/
|
||||
public static final TagKey<Fluid> GASEOUS = cTag("gaseous");
|
||||
/**
|
||||
* Holds all fluids related to honey.<br></br>
|
||||
* (Standard unit for honey bottle is 250mb per bottle)
|
||||
*/
|
||||
public static final TagKey<Fluid> HONEY = cTag("honey");
|
||||
/**
|
||||
* Holds all fluids related to experience.
|
||||
* <p>(Standard unit for experience is 20mb per 1 experience. However, extraction from Bottle o' Enchanting
|
||||
* should yield 250mb while smashing yields less)</p>
|
||||
*/
|
||||
public static final TagKey<Fluid> EXPERIENCE = cTag("experience");
|
||||
/**
|
||||
* Holds all fluids related to potions. The effects of the potion fluid should be read from NBT.
|
||||
* 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.
|
||||
* <p>(Standard unit for potions is 250mb per bottle)</p>
|
||||
*/
|
||||
public static final TagKey<Fluid> POTION = cTag("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.
|
||||
* <p>(Standard unit for suspicious stew is 250mb per bowl)</p>
|
||||
*/
|
||||
public static final TagKey<Fluid> SUSPICIOUS_STEW = cTag("suspicious_stew");
|
||||
/**
|
||||
* Holds all fluids related to Mushroom Stew.
|
||||
* <p>(Standard unit for mushroom stew is 250mb per bowl)</p>
|
||||
*/
|
||||
public static final TagKey<Fluid> MUSHROOM_STEW = cTag("mushroom_stew");
|
||||
/**
|
||||
* Holds all fluids related to Rabbit Stew.<br></br>
|
||||
* <p>(Standard unit for rabbit stew is 250mb per bowl)</p>
|
||||
*/
|
||||
public static final TagKey<Fluid> RABBIT_STEW = cTag("rabbit_stew");
|
||||
/**
|
||||
* Holds all fluids related to Beetroot Soup.
|
||||
* <p>(Standard unit for beetroot soup is 250mb per bowl)</p>
|
||||
*/
|
||||
public static final TagKey<Fluid> BEETROOT_SOUP = cTag("beetroot_soup");
|
||||
/**
|
||||
* Tag that holds all fluids that recipe viewers should not show to users.
|
||||
*/
|
||||
|
|
@ -1134,10 +1140,6 @@ public class Tags {
|
|||
private static TagKey<Fluid> cTag(String name) {
|
||||
return FluidTags.create(ResourceLocation.fromNamespaceAndPath("c", name));
|
||||
}
|
||||
|
||||
private static TagKey<Fluid> forgeTag(String name) {
|
||||
return FluidTags.create(ResourceLocation.fromNamespaceAndPath("forge", name));
|
||||
}
|
||||
}
|
||||
|
||||
public static class Enchantments {
|
||||
|
|
|
|||
|
|
@ -33,13 +33,14 @@ public final class ForgeFluidTagsProvider extends FluidTagsProvider {
|
|||
tag(WATER).add(net.minecraft.world.level.material.Fluids.WATER).add(net.minecraft.world.level.material.Fluids.FLOWING_WATER);
|
||||
tag(LAVA).add(net.minecraft.world.level.material.Fluids.LAVA).add(net.minecraft.world.level.material.Fluids.FLOWING_LAVA);
|
||||
tag(MILK).addOptional(ForgeMod.MILK.getId()).addOptional(ForgeMod.FLOWING_MILK.getId());
|
||||
tag(GASEOUS);
|
||||
tag(GASEOUS).addOptionalTag(forgeTagKey("gaseous"));
|
||||
tag(HONEY);
|
||||
tag(POTION);
|
||||
tag(SUSPICIOUS_STEW);
|
||||
tag(MUSHROOM_STEW);
|
||||
tag(RABBIT_STEW);
|
||||
tag(BEETROOT_SOUP);
|
||||
tag(EXPERIENCE);
|
||||
tag(POTION).addOptionalTag(forgeTagKey("potion"));
|
||||
tag(SUSPICIOUS_STEW).addOptionalTag(forgeTagKey("suspicious_stew"));
|
||||
tag(MUSHROOM_STEW).addOptionalTag(forgeTagKey("mushroom_stew"));
|
||||
tag(RABBIT_STEW).addOptionalTag(forgeTagKey("rabbit_stew"));
|
||||
tag(BEETROOT_SOUP).addOptionalTag(forgeTagKey("beetroot_soup"));
|
||||
tag(HIDDEN_FROM_RECIPE_VIEWERS);
|
||||
|
||||
// Backwards compat definitions for pre-1.21 legacy `forge:` tags.
|
||||
|
|
@ -47,6 +48,12 @@ public final class ForgeFluidTagsProvider extends FluidTagsProvider {
|
|||
tag(forgeTagKey("milk"))
|
||||
.addOptional(ForgeMod.MILK.getId())
|
||||
.addOptional(ForgeMod.FLOWING_MILK.getId());
|
||||
tag(forgeTagKey("gaseous"));
|
||||
tag(forgeTagKey("potion"));
|
||||
tag(forgeTagKey("suspicious_stew"));
|
||||
tag(forgeTagKey("mushroom_stew"));
|
||||
tag(forgeTagKey("rabbit_stew"));
|
||||
tag(forgeTagKey("beetroot_soup"));
|
||||
}
|
||||
|
||||
private static TagKey<Fluid> forgeTagKey(String path) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue