Skip to content

Commit

Permalink
Fix BWG Planks not being shown to craft specific wood set crafting ta…
Browse files Browse the repository at this point in the history
…bles. Closes #192

Signed-off-by: Joseph T. McQuigg <J.T.McQuigg12@gmail.com>
  • Loading branch information
JT122406 committed Jan 8, 2025
1 parent 8d780c7 commit d5b2993
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# 1.5.1
- Make Tall Allium and Allium Flower Bush make Magenta Dye to match Vanilla
- BoneMealing The Hydrange Hedge block will now Drop Hydrangea Hedges
- BoneMealing Grass Block/Lush Grass Block/Overgrown Stone/Dacite will now grow not just grass but any flower from that biomes flower pool
- Add Built-in Support for Repurposed Structures (Adds Forager Houses to Villages) (Credits: TelepathicGrunt)
- Fix BWG Planks not being shown to craft specific wood set crafting tables

# 1.5.0 -> Major Internal Changes and Refactors
- Add Spanish (Chile) Translations (es_cl) (Credits: Ganbare-Lucifer) (#172)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_the_recipe": {
"conditions": {
"recipe": "minecraft:crafting_table"
},
"trigger": "minecraft:recipe_unlocked"
},
"has_vanilla_planks": {
"conditions": {
"items": [
{
"tag": "minecraft:vanilla_planks"
}
]
},
"trigger": "minecraft:inventory_changed"
}
},
"requirements": [
[
"has_vanilla_planks",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"minecraft:crafting_table"
]
},
"sends_telemetry_event": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"group": "planks",
"key": {
"#": {
"tag": "minecraft:vanilla_planks"
}
},
"pattern": [
"##",
"##"
],
"result": {
"item": "minecraft:crafting_table"
},
"show_notification": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"values": [
"minecraft:acacia_planks",
"minecraft:bamboo_planks",
"minecraft:birch_planks",
"minecraft:cherry_planks",
"minecraft:crimson_planks",
"minecraft:crimson_planks",
"minecraft:dark_oak_planks",
"minecraft:jungle_planks",
"minecraft:mangrove_planks",
"minecraft:oak_planks",
"minecraft:spruce_planks",
"minecraft:warped_planks"
]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.potionstudios.biomeswevegone.tags;

import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;
import net.potionstudios.biomeswevegone.BiomesWeveGone;
Expand Down Expand Up @@ -46,6 +47,8 @@ public class BWGItemTags {

public static final TagKey<Item> MUSHROOMS = create("mushrooms");

public static final TagKey<Item> VANILLA_PLANKS = TagKey.create(Registries.ITEM, new ResourceLocation("vanilla_planks"));


private static TagKey<Item> create(String name) {
return TagKey.create(Registries.ITEM, BiomesWeveGone.id(name));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ public RecipeGenerator(PackOutput output) {

@Override
protected void buildRecipes(@NotNull Consumer<FinishedRecipe> writer) {
ShapedRecipeBuilder.shaped(RecipeCategory.MISC, Items.CRAFTING_TABLE)
.define('#', BWGItemTags.VANILLA_PLANKS)
.pattern("##")
.pattern("##")
.group("planks")
.unlockedBy("has_vanilla_planks", has(BWGItemTags.VANILLA_PLANKS))
.save(writer);

BWGWoodSet.woodsets().forEach(set -> {
planksFromLog(writer, set.planks(), set.logItemTag(), 4);
woodFromLogs(writer, set.wood(), set.logstem());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ else if (block.defaultMapColor() == MapColor.COLOR_YELLOW)
tag(Tags.Items.MUSHROOMS).add(BWGBlocks.GREEN_MUSHROOM.get().asItem(), BWGBlocks.WEEPING_MILKCAP.get().asItem(), BWGBlocks.WOOD_BLEWIT.get().asItem());
tag(Tags.Items.CROPS).add(BWGItems.ODDION_BULB.get());
tag(BWGItemTags.MUSHROOMS).add(Items.BROWN_MUSHROOM, Items.RED_MUSHROOM, BWGBlocks.GREEN_MUSHROOM.get().asItem(), BWGBlocks.WEEPING_MILKCAP.get().asItem(), BWGBlocks.WOOD_BLEWIT.get().asItem()).addOptionalTag(Tags.Items.MUSHROOMS);
tag(BWGItemTags.VANILLA_PLANKS).add(Items.ACACIA_PLANKS, Items.BIRCH_PLANKS, Items.CRIMSON_PLANKS, Items.DARK_OAK_PLANKS, Items.JUNGLE_PLANKS, Items.OAK_PLANKS, Items.SPRUCE_PLANKS, Items.WARPED_PLANKS, Items.CHERRY_PLANKS, Items.MANGROVE_PLANKS, Items.BAMBOO_PLANKS, Items.CRIMSON_PLANKS);
sortTagsAlphabeticallyAndRemoveDuplicateTagEntries(this.builders);
}
}
Expand Down

0 comments on commit d5b2993

Please sign in to comment.