allow warped planks in the crimson altar

This commit is contained in:
Ell 2021-01-14 23:03:09 +01:00
parent 45022cde9f
commit 5350566f9c
4 changed files with 18 additions and 2 deletions

View file

@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"minecraft:crimson_planks",
"minecraft:warped_planks"
]
}

View file

@ -7,6 +7,7 @@ import de.ellpeck.naturesaura.api.multiblock.IMultiblock;
import de.ellpeck.naturesaura.api.multiblock.Matcher;
import de.ellpeck.naturesaura.blocks.BlockNatureAltar;
import de.ellpeck.naturesaura.blocks.ModBlocks;
import de.ellpeck.naturesaura.data.BlockTagProvider;
import de.ellpeck.naturesaura.recipes.ModRecipes;
import net.minecraft.block.Blocks;
import net.minecraft.block.SaplingBlock;
@ -36,7 +37,7 @@ public final class Multiblocks {
ALTAR_PATTERN,
'C', Blocks.RED_NETHER_BRICKS,
'B', Blocks.NETHER_BRICKS,
'W', Blocks.CRIMSON_PLANKS,
'W', Matcher.tag(Blocks.CRIMSON_PLANKS, BlockTagProvider.NETHER_ALTAR_WOOD),
'M', ModBlocks.GOLD_NETHER_BRICK,
'0', ModBlocks.NATURE_ALTAR.getDefaultState().with(BlockNatureAltar.NETHER, true),
' ', Matcher.wildcard());

View file

@ -1,12 +1,19 @@
package de.ellpeck.naturesaura.data;
import de.ellpeck.naturesaura.NaturesAura;
import de.ellpeck.naturesaura.blocks.ModBlocks;
import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraft.data.BlockTagsProvider;
import net.minecraft.data.DataGenerator;
import net.minecraft.tags.BlockTags;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.Tags;
public class BlockTagProvider extends BlockTagsProvider {
public static final Tags.IOptionalNamedTag<Block> NETHER_ALTAR_WOOD = BlockTags.createOptional(new ResourceLocation(NaturesAura.MOD_ID, "nether_altar_wood"));
public BlockTagProvider(DataGenerator generatorIn) {
super(generatorIn);
}
@ -21,5 +28,6 @@ public class BlockTagProvider extends BlockTagsProvider {
this.getOrCreateBuilder(BlockTags.SLABS).add(ModBlocks.ANCIENT_SLAB, ModBlocks.INFUSED_SLAB, ModBlocks.INFUSED_BRICK_SLAB);
this.getOrCreateBuilder(Tags.Blocks.DIRT).add(ModBlocks.NETHER_GRASS);
this.getOrCreateBuilder(BlockTags.SMALL_FLOWERS).add(ModBlocks.END_FLOWER, ModBlocks.AURA_BLOOM);
this.getOrCreateBuilder(NETHER_ALTAR_WOOD).add(Blocks.CRIMSON_PLANKS, Blocks.WARPED_PLANKS);
}
}

View file

@ -17,7 +17,7 @@
{
"type": "multiblock",
"multiblock_id": "naturesaura:nether_altar",
"text": "How to assemble the $(item)Crimson Altar$()"
"text": "How to assemble the $(item)Crimson Altar$(). The $(item)Crimson Planks$() can be replaced with $(item)Warped Planks$()."
},
{
"type": "crafting",