Skip to content

Commit

Permalink
Powder Snow Bucket tag, defense enchantment tag name fix, missing mea…
Browse files Browse the repository at this point in the history
…t tag entry (#3727)

* Multiple tag fixes

* Make the tag rename not breaking
  • Loading branch information
TelepathicGrunt authored Apr 21, 2024
1 parent b82b239 commit 2b43c5c
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ private enum LOG_WARNING_MODES {
createMapEntry(ConventionalEnchantmentTags.INCREASES_BLOCK_DROPS, net.fabricmc.fabric.api.tag.convention.v2.ConventionalEnchantmentTags.INCREASE_BLOCK_DROPS),
createMapEntry(ConventionalEnchantmentTags.INCREASES_ENTITY_DROPS, net.fabricmc.fabric.api.tag.convention.v2.ConventionalEnchantmentTags.INCREASE_ENTITY_DROPS),
createMapEntry(ConventionalEnchantmentTags.ENTITY_MOVEMENT_ENHANCEMENT, net.fabricmc.fabric.api.tag.convention.v2.ConventionalEnchantmentTags.ENTITY_SPEED_ENHANCEMENTS),
createMapEntry(ConventionalEnchantmentTags.ENTITY_DEFENSE_ENHANCEMENT, net.fabricmc.fabric.api.tag.convention.v2.ConventionalEnchantmentTags.ENTITY_DEFENSE_ENHANCEMENTS),

createMapEntry(ConventionalBiomeTags.IN_NETHER, net.fabricmc.fabric.api.tag.convention.v2.ConventionalBiomeTags.IS_NETHER),
createMapEntry(ConventionalBiomeTags.IN_THE_END, net.fabricmc.fabric.api.tag.convention.v2.ConventionalBiomeTags.IS_END),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected void configure(RegistryWrapper.WrapperLookup registries) {
getOrCreateTagBuilder(ConventionalEnchantmentTags.ENTITY_AUXILIARY_MOVEMENT_ENHANCEMENTS)
.add(Enchantments.FEATHER_FALLING)
.add(Enchantments.FROST_WALKER);
getOrCreateTagBuilder(ConventionalEnchantmentTags.ENTITY_DEFENSE_ENHANCEMENT)
getOrCreateTagBuilder(ConventionalEnchantmentTags.ENTITY_DEFENSE_ENHANCEMENTS)
.add(Enchantments.PROTECTION)
.add(Enchantments.BLAST_PROTECTION)
.add(Enchantments.PROJECTILE_PROTECTION)
Expand All @@ -62,5 +62,7 @@ protected void configure(RegistryWrapper.WrapperLookup registries) {
// TODO: Remove backwards compat tag entries in 1.22
getOrCreateTagBuilder(ConventionalEnchantmentTags.ENTITY_SPEED_ENHANCEMENTS)
.addOptionalTag(new Identifier("c", "entity_movement_enhancement"));
getOrCreateTagBuilder(ConventionalEnchantmentTags.ENTITY_DEFENSE_ENHANCEMENTS)
.addOptionalTag(new Identifier("c", "entity_defense_enhancement"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ private void generateFoodTags() {

getOrCreateTagBuilder(ConventionalItemTags.RAW_MEATS_FOODS)
.add(Items.BEEF)
.add(Items.PORKCHOP)
.add(Items.CHICKEN)
.add(Items.RABBIT)
.add(Items.MUTTON);
Expand All @@ -191,6 +192,7 @@ private void generateFoodTags() {

getOrCreateTagBuilder(ConventionalItemTags.COOKED_MEATS_FOODS)
.add(Items.COOKED_BEEF)
.add(Items.COOKED_PORKCHOP)
.add(Items.COOKED_CHICKEN)
.add(Items.COOKED_RABBIT)
.add(Items.COOKED_MUTTON);
Expand Down Expand Up @@ -254,6 +256,15 @@ private void generateBucketTags() {
.add(Items.WATER_BUCKET);
getOrCreateTagBuilder(ConventionalItemTags.MILK_BUCKETS)
.add(Items.MILK_BUCKET);
getOrCreateTagBuilder(ConventionalItemTags.POWDER_SNOW_BUCKETS)
.add(Items.POWDER_SNOW_BUCKET);
getOrCreateTagBuilder(ConventionalItemTags.BUCKETS)
.addOptionalTag(ConventionalItemTags.EMPTY_BUCKETS)
.addOptionalTag(ConventionalItemTags.WATER_BUCKETS)
.addOptionalTag(ConventionalItemTags.LAVA_BUCKETS)
.addOptionalTag(ConventionalItemTags.MILK_BUCKETS)
.addOptionalTag(ConventionalItemTags.POWDER_SNOW_BUCKETS)
.addOptionalTag(ConventionalItemTags.ENTITY_WATER_BUCKETS);
}

private void generateOreAndRelatedTags() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"minecraft:projectile_protection",
"minecraft:fire_protection",
"minecraft:respiration",
"minecraft:feather_falling"
"minecraft:feather_falling",
{
"id": "#c:entity_defense_enhancement",
"required": false
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"values": [
{
"id": "#c:buckets/empty",
"required": false
},
{
"id": "#c:buckets/water",
"required": false
},
{
"id": "#c:buckets/lava",
"required": false
},
{
"id": "#c:buckets/milk",
"required": false
},
{
"id": "#c:buckets/powder_snow",
"required": false
},
{
"id": "#c:buckets/entity_water",
"required": false
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"minecraft:powder_snow_bucket"
]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"values": [
"minecraft:cooked_beef",
"minecraft:cooked_porkchop",
"minecraft:cooked_chicken",
"minecraft:cooked_rabbit",
"minecraft:cooked_mutton"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"values": [
"minecraft:beef",
"minecraft:porkchop",
"minecraft:chicken",
"minecraft:rabbit",
"minecraft:mutton"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private ConventionalEnchantmentTags() {
/**
* For enchantments that decrease damage taken or otherwise benefit, in regard to damage, the entity wearing armor enchanted with it.
*/
public static final TagKey<Enchantment> ENTITY_DEFENSE_ENHANCEMENT = register("entity_defense_enhancement");
public static final TagKey<Enchantment> ENTITY_DEFENSE_ENHANCEMENTS = register("entity_defense_enhancements");

private static TagKey<Enchantment> register(String tagId) {
return TagRegistration.ENCHANTMENT_TAG.registerC(tagId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,16 @@ private ConventionalItemTags() {
public static final TagKey<Item> FOOD_POISONING_FOODS = register("foods/food_poisoning");

// Buckets
public static final TagKey<Item> BUCKETS = register("buckets");
public static final TagKey<Item> EMPTY_BUCKETS = register("buckets/empty");
/**
* Does not include entity water buckets.
*/
public static final TagKey<Item> WATER_BUCKETS = register("buckets/water");
public static final TagKey<Item> ENTITY_WATER_BUCKETS = register("buckets/entity_water");
public static final TagKey<Item> LAVA_BUCKETS = register("buckets/lava");
public static final TagKey<Item> MILK_BUCKETS = register("buckets/milk");
public static final TagKey<Item> EMPTY_BUCKETS = register("buckets/empty");
public static final TagKey<Item> POWDER_SNOW_BUCKETS = register("buckets/powder_snow");
public static final TagKey<Item> ENTITY_WATER_BUCKETS = register("buckets/entity_water");

public static final TagKey<Item> BARRELS = register("barrels");
public static final TagKey<Item> WOODEN_BARRELS = register("barrels/wooden");
Expand Down

0 comments on commit 2b43c5c

Please sign in to comment.