still allow using the nether altar layout

This commit is contained in:
Ell 2023-02-15 22:59:14 +01:00
parent 9294a90e1a
commit 36b5114da3
11 changed files with 82 additions and 79 deletions

View file

@ -1,15 +1,15 @@
{
"values": [
"naturesaura:ancient_planks",
"naturesaura:auto_crafter",
"naturesaura:ancient_bark",
"naturesaura:ancient_log",
"naturesaura:oak_generator",
"naturesaura:flower_generator",
"naturesaura:ancient_stairs",
"naturesaura:wood_stand",
"naturesaura:ancient_slab",
"naturesaura:ancient_log",
"naturesaura:offering_table",
"naturesaura:nether_wart_mushroom"
"naturesaura:ancient_planks",
"naturesaura:ancient_stairs",
"naturesaura:oak_generator",
"naturesaura:wood_stand",
"naturesaura:ancient_bark",
"naturesaura:ancient_slab",
"naturesaura:nether_wart_mushroom",
"naturesaura:auto_crafter"
]
}

View file

@ -1,46 +1,46 @@
{
"values": [
"naturesaura:item_distributor",
"naturesaura:powder_placer",
"naturesaura:animal_generator",
"naturesaura:nature_altar",
"naturesaura:infused_slab",
"naturesaura:spring",
"naturesaura:chorus_generator",
"naturesaura:snow_creator",
"naturesaura:hopper_upgrade",
"naturesaura:animal_spawner",
"naturesaura:infused_stone",
"naturesaura:projectile_generator",
"naturesaura:grated_chute",
"naturesaura:animal_container",
"naturesaura:placer",
"naturesaura:infused_brick",
"naturesaura:blast_furnace_booster",
"naturesaura:rf_converter",
"naturesaura:firework_generator",
"naturesaura:aura_detector",
"naturesaura:infused_slab",
"naturesaura:tainted_gold_block",
"naturesaura:moss_generator",
"naturesaura:gold_brick",
"naturesaura:grated_chute",
"naturesaura:snow_creator",
"naturesaura:infused_brick",
"naturesaura:weather_changer",
"naturesaura:infused_brick_slab",
"naturesaura:pickup_stopper",
"naturesaura:spawn_lamp",
"naturesaura:aura_detector",
"naturesaura:field_creator",
"naturesaura:conversion_catalyst",
"naturesaura:chunk_loader",
"naturesaura:aura_timer",
"naturesaura:potion_generator",
"naturesaura:infused_stone",
"naturesaura:time_changer",
"naturesaura:infused_iron_block",
"naturesaura:gold_nether_brick",
"naturesaura:ender_crate",
"naturesaura:infused_brick_stairs",
"naturesaura:crushing_catalyst",
"naturesaura:nether_grass",
"naturesaura:generator_limit_remover",
"naturesaura:nature_altar",
"naturesaura:placer",
"naturesaura:firework_generator",
"naturesaura:infused_stairs",
"naturesaura:furnace_heater"
"naturesaura:projectile_generator",
"naturesaura:item_distributor",
"naturesaura:chunk_loader",
"naturesaura:rf_converter",
"naturesaura:spawn_lamp",
"naturesaura:blast_furnace_booster",
"naturesaura:nether_grass",
"naturesaura:animal_container",
"naturesaura:moss_generator",
"naturesaura:generator_limit_remover",
"naturesaura:pickup_stopper",
"naturesaura:aura_timer",
"naturesaura:animal_spawner",
"naturesaura:ender_crate",
"naturesaura:animal_generator",
"naturesaura:chorus_generator",
"naturesaura:hopper_upgrade",
"naturesaura:furnace_heater",
"naturesaura:potion_generator",
"naturesaura:infused_brick_stairs",
"naturesaura:infused_iron_block",
"naturesaura:powder_placer",
"naturesaura:crushing_catalyst",
"naturesaura:conversion_catalyst",
"naturesaura:gold_nether_brick",
"naturesaura:gold_brick"
]
}

View file

@ -0,0 +1,6 @@
{
"values": [
"minecraft:red_nether_bricks",
"minecraft:chiseled_stone_bricks"
]
}

View file

@ -0,0 +1,6 @@
{
"values": [
"naturesaura:gold_brick",
"naturesaura:gold_nether_brick"
]
}

View file

@ -1,5 +1,6 @@
{
"values": [
"#minecraft:stone_bricks"
"#minecraft:stone_bricks",
"minecraft:nether_bricks"
]
}

View file

@ -1,5 +1,7 @@
{
"values": [
"#minecraft:planks"
"#minecraft:planks",
"minecraft:crimson_planks",
"minecraft:warped_planks"
]
}

View file

@ -1,5 +0,0 @@
{
"values": [
"minecraft:nether_bricks"
]
}

View file

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

View file

@ -9,7 +9,7 @@ import net.minecraft.world.level.block.state.BlockState;
public record Matcher(BlockState defaultState, ICheck check) {
public static Matcher wildcard() {
public static Matcher any() {
return new Matcher(Blocks.AIR.defaultBlockState(), null);
}

View file

@ -15,20 +15,19 @@ import net.minecraft.world.level.material.Material;
public final class Multiblocks {
private static final String[][] ALTAR_PATTERN = new String[][]{
{" M ", " ", " ", " ", "M M", " ", " ", " ", " M "},
{" B ", " ", " ", " ", "B B", " ", " ", " ", " B "},
{" B ", " ", " M M ", " ", "B 0 B", " ", " M M ", " ", " B "},
{" ", " WBW ", " WBW ", " WWCWCWW ", " BBW WBB ", " WWCWCWW ", " WBW ", " WBW ", " "}};
public static final IMultiblock ALTAR = NaturesAuraAPI.instance().createMultiblock(
new ResourceLocation(NaturesAura.MOD_ID, "altar"),
Multiblocks.ALTAR_PATTERN,
'C', Blocks.CHISELED_STONE_BRICKS,
new String[][]{
{" M ", " ", " ", " ", "M M", " ", " ", " ", " M "},
{" B ", " ", " ", " ", "B B", " ", " ", " ", " B "},
{" B ", " ", " M M ", " ", "B 0 B", " ", " M M ", " ", " B "},
{" ", " WBW ", " WBW ", " WWCWCWW ", " BBW WBB ", " WWCWCWW ", " WBW ", " WBW ", " "}},
'C', Matcher.tag(Blocks.CHISELED_STONE_BRICKS, BlockTagProvider.ALTAR_FANCY_BRICK),
'B', Matcher.tag(Blocks.STONE_BRICKS, BlockTagProvider.ALTAR_STONE),
'W', Matcher.tag(Blocks.OAK_PLANKS, BlockTagProvider.ALTAR_WOOD),
'M', ModBlocks.GOLD_BRICK,
'M', Matcher.tag(ModBlocks.GOLD_BRICK, BlockTagProvider.ALTAR_GOLD_BRICK),
'0', ModBlocks.NATURE_ALTAR,
' ', Matcher.wildcard());
' ', Matcher.any());
public static final IMultiblock TREE_RITUAL = NaturesAuraAPI.instance().createMultiblock(
new ResourceLocation(NaturesAura.MOD_ID, "tree_ritual"),
new String[][]{
@ -49,7 +48,7 @@ public final class Multiblocks {
}
}
),
' ', Matcher.wildcard());
' ', Matcher.any());
public static final IMultiblock POTION_GENERATOR = NaturesAuraAPI.instance().createMultiblock(
new ResourceLocation(NaturesAura.MOD_ID, "potion_generator"),
new String[][]{
@ -60,7 +59,7 @@ public final class Multiblocks {
'N', Blocks.NETHER_BRICKS,
'R', Blocks.RED_NETHER_BRICKS,
'0', ModBlocks.POTION_GENERATOR,
' ', Matcher.wildcard());
' ', Matcher.any());
public static final IMultiblock OFFERING_TABLE = NaturesAuraAPI.instance().createMultiblock(
new ResourceLocation(NaturesAura.MOD_ID, "offering_table"),
new String[][]{
@ -68,7 +67,7 @@ public final class Multiblocks {
'R', new Matcher(Blocks.POPPY.defaultBlockState(),
(level, start, offset, pos, state, c) -> state.is(BlockTags.SMALL_FLOWERS)),
'0', ModBlocks.OFFERING_TABLE,
' ', Matcher.wildcard());
' ', Matcher.any());
public static final IMultiblock ANIMAL_SPAWNER = NaturesAuraAPI.instance().createMultiblock(
new ResourceLocation(NaturesAura.MOD_ID, "animal_spawner"),
new String[][]{
@ -78,7 +77,7 @@ public final class Multiblocks {
'R', ModBlocks.INFUSED_BRICK,
'W', ModBlocks.ANCIENT_PLANKS,
'0', ModBlocks.ANIMAL_SPAWNER,
' ', Matcher.wildcard());
' ', Matcher.any());
public static final IMultiblock AUTO_CRAFTER = NaturesAuraAPI.instance().createMultiblock(
new ResourceLocation(NaturesAura.MOD_ID, "auto_crafter"),
new String[][]{
@ -86,7 +85,7 @@ public final class Multiblocks {
'P', ModBlocks.ANCIENT_PLANKS,
'L', ModBlocks.ANCIENT_LOG,
'0', ModBlocks.AUTO_CRAFTER,
' ', Matcher.wildcard());
' ', Matcher.any());
public static final IMultiblock RF_CONVERTER = NaturesAuraAPI.instance().createMultiblock(
new ResourceLocation(NaturesAura.MOD_ID, "rf_converter"),
new String[][]{
@ -99,5 +98,5 @@ public final class Multiblocks {
{" ", " ", " ", " R ", " ", " ", " "}},
'R', Blocks.REDSTONE_BLOCK,
'0', ModBlocks.RF_CONVERTER,
' ', Matcher.wildcard());
' ', Matcher.any());
}

View file

@ -18,8 +18,8 @@ public class BlockTagProvider extends BlockTagsProvider {
public static final TagKey<Block> ALTAR_WOOD = BlockTags.create(new ResourceLocation(NaturesAura.MOD_ID, "altar_wood"));
public static final TagKey<Block> ALTAR_STONE = BlockTags.create(new ResourceLocation(NaturesAura.MOD_ID, "altar_stone"));
public static final TagKey<Block> NETHER_ALTAR_WOOD = BlockTags.create(new ResourceLocation(NaturesAura.MOD_ID, "nether_altar_wood"));
public static final TagKey<Block> NETHER_ALTAR_STONE = BlockTags.create(new ResourceLocation(NaturesAura.MOD_ID, "nether_altar_stone"));
public static final TagKey<Block> ALTAR_GOLD_BRICK = BlockTags.create(new ResourceLocation(NaturesAura.MOD_ID, "altar_gold_brick"));
public static final TagKey<Block> ALTAR_FANCY_BRICK = BlockTags.create(new ResourceLocation(NaturesAura.MOD_ID, "altar_fancy_brick"));
public BlockTagProvider(DataGenerator gen, @Nullable ExistingFileHelper existingFileHelper) {
super(gen, NaturesAura.MOD_ID, existingFileHelper);
@ -35,10 +35,10 @@ public class BlockTagProvider extends BlockTagsProvider {
this.tag(BlockTags.SLABS).add(ModBlocks.ANCIENT_SLAB, ModBlocks.INFUSED_SLAB, ModBlocks.INFUSED_BRICK_SLAB);
this.tag(BlockTags.DIRT).add(ModBlocks.NETHER_GRASS);
this.tag(BlockTags.SMALL_FLOWERS).add(ModBlocks.END_FLOWER, ModBlocks.AURA_BLOOM);
this.tag(BlockTagProvider.ALTAR_WOOD).addTag(BlockTags.PLANKS);
this.tag(BlockTagProvider.ALTAR_STONE).addTag(BlockTags.STONE_BRICKS);
this.tag(BlockTagProvider.NETHER_ALTAR_WOOD).add(Blocks.CRIMSON_PLANKS, Blocks.WARPED_PLANKS);
this.tag(BlockTagProvider.NETHER_ALTAR_STONE).add(Blocks.NETHER_BRICKS);
this.tag(BlockTagProvider.ALTAR_WOOD).addTag(BlockTags.PLANKS).add(Blocks.CRIMSON_PLANKS, Blocks.WARPED_PLANKS);
this.tag(BlockTagProvider.ALTAR_STONE).addTag(BlockTags.STONE_BRICKS).add(Blocks.NETHER_BRICKS);
this.tag(BlockTagProvider.ALTAR_GOLD_BRICK).add(ModBlocks.GOLD_BRICK, ModBlocks.GOLD_NETHER_BRICK);
this.tag(BlockTagProvider.ALTAR_FANCY_BRICK).add(Blocks.RED_NETHER_BRICKS, Blocks.CHISELED_STONE_BRICKS);
for (var item : ModRegistry.ALL_ITEMS) {
if (!(item instanceof Block b))