Skip to content

Commit

Permalink
fix: Fix crafting book being uncraftable due to incorrect diamonds tag
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Jun 1, 2024
1 parent 260bc7e commit 484627e
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 82 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"item": "minecraft:crafting_table"
},
"D": {
"tag": "c:gems/diamonds"
"tag": "c:gems/diamond"
}
},
"pattern": [
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricRecipeProvider;
import net.minecraft.core.HolderLookup;
import net.minecraft.core.registries.Registries;
import net.minecraft.data.recipes.RecipeCategory;
import net.minecraft.data.recipes.RecipeOutput;
import net.minecraft.data.recipes.ShapedRecipeBuilder;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.ItemTags;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.DyeColor;
Expand Down Expand Up @@ -258,7 +260,7 @@ public void buildRecipes(RecipeOutput exporter) {
.pattern(" D ")
.pattern("CBC")
.pattern(" D ")
.define('D', BalmItemTags.DIAMONDS)
.define('D', TagKey.create(Registries.ITEM, new ResourceLocation("c", "gems/diamond")))
.define('C', Blocks.CRAFTING_TABLE)
.define('B', ModItems.recipeBook)
.unlockedBy("has_recipe_book", has(ModItems.recipeBook))
Expand Down

0 comments on commit 484627e

Please sign in to comment.