diff --git a/build.gradle b/build.gradle index 34c55fa107..f3ae71d953 100644 --- a/build.gradle +++ b/build.gradle @@ -21,7 +21,7 @@ ext { } changelog { - from '47.999' + from '64.0' } tasks.register('setup') { diff --git a/src/main/generated/data/c/tags/item/drink_containing/bottle.json b/src/main/generated/data/c/tags/item/drink_containing/bottle.json new file mode 100644 index 0000000000..068ca91291 --- /dev/null +++ b/src/main/generated/data/c/tags/item/drink_containing/bottle.json @@ -0,0 +1,7 @@ +{ + "values": [ + "minecraft:potion", + "minecraft:honey_bottle", + "minecraft:ominous_bottle" + ] +} \ No newline at end of file diff --git a/src/main/generated/data/c/tags/item/drink_containing/bucket.json b/src/main/generated/data/c/tags/item/drink_containing/bucket.json new file mode 100644 index 0000000000..899451cb24 --- /dev/null +++ b/src/main/generated/data/c/tags/item/drink_containing/bucket.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:milk_bucket" + ] +} \ No newline at end of file diff --git a/src/main/java/net/minecraftforge/common/Tags.java b/src/main/java/net/minecraftforge/common/Tags.java index 352cd3d740..ce7c2ba2d7 100644 --- a/src/main/java/net/minecraftforge/common/Tags.java +++ b/src/main/java/net/minecraftforge/common/Tags.java @@ -12,11 +12,13 @@ import net.minecraft.tags.BlockTags; import net.minecraft.tags.FluidTags; import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; +import net.minecraft.world.effect.MobEffects; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.decoration.ItemFrame; import net.minecraft.world.entity.monster.EnderMan; import net.minecraft.world.item.DyeColor; import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemUseAnimation; import net.minecraft.world.item.enchantment.Enchantment; import net.minecraft.world.level.Level; import net.minecraft.world.level.biome.Biome; @@ -415,15 +417,49 @@ public class Tags { public static final TagKey DUSTS_REDSTONE = cTag("dusts/redstone"); public static final TagKey DUSTS_GLOWSTONE = cTag("dusts/glowstone"); + /** + * Drinks are defined as (1) consumable items that (2) use the + * {@linkplain ItemUseAnimation#DRINK drink item use animation}, (3) can be consumed regardless of the + * player's current hunger. + * + *

Drinks may provide nutrition and saturation, but are not required to do so. + * + *

More specific types of drinks, such as Water, Milk, or Juice should be placed in a sub-tag, such as + * {@code #c:drinks/water}, {@code #c:drinks/milk}, and {@code #c:drinks/juice}. + */ public static final TagKey DRINKS = cTag("drinks"); public static final TagKey DRINKS_HONEY = cTag("drinks/honey"); + /** + * Plant based fruit and vegetable juices belong in this tag, for example apple juice and carrot juice. + * + *

If tags for specific types of juices are desired, they may go in a sub-tag, using their regular name such as + * {@code #c:drinks/apple_juice}. + */ public static final TagKey DRINKS_JUICE = cTag("drinks/juice"); public static final TagKey DRINKS_MAGIC = cTag("drinks/magic"); public static final TagKey DRINKS_MILK = cTag("drinks/milk"); + /** + * For drinks that always grant the {@linkplain MobEffects#BAD_OMEN Bad Omen} effect. + */ public static final TagKey DRINKS_OMINOUS = cTag("drinks/ominous"); + /** + * For consumable drinks that contain only water. + */ public static final TagKey DRINKS_WATER = cTag("drinks/water"); + /** + * For consumable drinks that are generally watery (such as potions). + */ public static final TagKey DRINKS_WATERY = cTag("drinks/watery"); + /** + * For non-empty bottles that are {@linkplain #DRINKS drinkable}. + */ + public static final TagKey DRINK_CONTAINING_BOTTLE = cTag("drink_containing/bottle"); + /** + * For non-empty buckets that are {@linkplain #DRINKS drinkable}. + */ + public static final TagKey DRINK_CONTAINING_BUCKET = cTag("drink_containing/bucket"); + /** * Tag that holds all blocks and items that can be dyed a specific color. * (Does not include color blending items like leather armor diff --git a/src/main/java/net/minecraftforge/common/data/ForgeItemTagsProvider.java b/src/main/java/net/minecraftforge/common/data/ForgeItemTagsProvider.java index 7f4e95eb0c..871872370b 100644 --- a/src/main/java/net/minecraftforge/common/data/ForgeItemTagsProvider.java +++ b/src/main/java/net/minecraftforge/common/data/ForgeItemTagsProvider.java @@ -84,6 +84,10 @@ public final class ForgeItemTagsProvider extends VanillaItemTagsProvider { tag(Tags.Items.CROPS_SUGAR_CANE).add(Items.SUGAR_CANE); tag(Tags.Items.CROPS_WHEAT) .add(Items.WHEAT); + tag(Tags.Items.DRINK_CONTAINING_BOTTLE) + .add(Items.POTION, Items.HONEY_BOTTLE, Items.OMINOUS_BOTTLE); + tag(Tags.Items.DRINK_CONTAINING_BUCKET) + .add(Items.MILK_BUCKET); tag(Tags.Items.DRINKS) .addTags(Tags.Items.DRINKS_HONEY, Tags.Items.DRINKS_JUICE, Tags.Items.DRINKS_MAGIC, Tags.Items.DRINKS_MILK, Tags.Items.DRINKS_OMINOUS, Tags.Items.DRINKS_WATER, Tags.Items.DRINKS_WATERY);