Skip to content

Commit

Permalink
Add c:experience fluid tag with javadoc for standard conversion rate (
Browse files Browse the repository at this point in the history
  • Loading branch information
TelepathicGrunt authored Oct 15, 2024
1 parent 2297188 commit feb8027
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/generated/resources/assets/c/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions src/generated/resources/data/c/tags/fluid/experience.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"values": []
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"),

Expand Down
30 changes: 21 additions & 9 deletions src/main/java/net/neoforged/neoforge/common/Tags.java
Original file line number Diff line number Diff line change
Expand Up @@ -768,12 +768,12 @@ private static TagKey<Item> neoforgeTag(String name) {
*/
public static class Fluids {
/**
* Holds all fluids related to water.
* Holds all fluids related to water.<p>
* 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<Fluid> WATER = tag("water");
/**
* Holds all fluids related to lava.
* Holds all fluids related to lava.<p>
* 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<Fluid> LAVA = tag("lava");
Expand All @@ -786,36 +786,48 @@ public static class Fluids {
*/
public static final TagKey<Fluid> GASEOUS = tag("gaseous");
/**
* Holds all fluids related to honey.<br></br>
* Holds all fluids related to honey.
* <p>
* (Standard unit for honey bottle is 250mb per bottle)
*/
public static final TagKey<Fluid> 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.
* <p>
* (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<Fluid> 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.<br></br>
* component that people should be attaching to the fluidstack of this fluid.
* <p>
* (Standard unit for potions is 250mb per bottle)
*/
public static final TagKey<Fluid> 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.<br></br>
* component that people should be attaching to the fluidstack of this fluid.
* <p>
* (Standard unit for suspicious stew is 250mb per bowl)
*/
public static final TagKey<Fluid> SUSPICIOUS_STEW = tag("suspicious_stew");
/**
* Holds all fluids related to Mushroom Stew.<br></br>
* Holds all fluids related to Mushroom Stew.
* <p>
* (Standard unit for mushroom stew is 250mb per bowl)
*/
public static final TagKey<Fluid> MUSHROOM_STEW = tag("mushroom_stew");
/**
* Holds all fluids related to Rabbit Stew.<br></br>
* Holds all fluids related to Rabbit Stew.
* <p>
* (Standard unit for rabbit stew is 250mb per bowl)
*/
public static final TagKey<Fluid> RABBIT_STEW = tag("rabbit_stew");
/**
* Holds all fluids related to Beetroot Soup.<br></br>
* Holds all fluids related to Beetroot Soup.
* <p>
* (Standard unit for beetroot soup is 250mb per bowl)
*/
public static final TagKey<Fluid> BEETROOT_SOUP = tag("beetroot_soup");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit feb8027

Please sign in to comment.