this may seem weird to some people, but

removed the nether altar
This commit is contained in:
Ell 2023-02-15 22:46:32 +01:00
parent ff264f5539
commit 9294a90e1a
52 changed files with 83 additions and 280 deletions

View file

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "naturesaura:block/conversion_catalyst"
}
}
}

View file

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "naturesaura:block/crushing_catalyst"
}
}
}

View file

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "naturesaura:block/nature_altar"
}
}
}

View file

@ -1,6 +0,0 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "naturesaura:block/conversion_catalyst_nether"
}
}

View file

@ -1,6 +0,0 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "naturesaura:block/crushing_catalyst_nether"
}
}

View file

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

View file

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

View file

@ -1,39 +0,0 @@
package de.ellpeck.naturesaura.blocks;
import de.ellpeck.naturesaura.api.NaturesAuraAPI;
import de.ellpeck.naturesaura.api.aura.type.IAuraType;
import de.ellpeck.naturesaura.data.BlockStateGenerator;
import de.ellpeck.naturesaura.reg.ICustomBlockState;
import net.minecraft.world.item.context.BlockPlaceContext;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.BooleanProperty;
public class BlockCatalyst extends BlockImpl implements ICustomBlockState {
public static final BooleanProperty NETHER = BlockNatureAltar.NETHER;
public BlockCatalyst(String baseName, Properties properties) {
super(baseName, properties);
this.registerDefaultState(this.defaultBlockState().setValue(BlockCatalyst.NETHER, false));
}
@Override
public BlockState getStateForPlacement(BlockPlaceContext context) {
var nether = IAuraType.forLevel(context.getLevel()).isSimilar(NaturesAuraAPI.TYPE_NETHER);
return super.getStateForPlacement(context).setValue(BlockCatalyst.NETHER, nether);
}
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
builder.add(BlockCatalyst.NETHER);
}
@Override
public void generateCustomBlockState(BlockStateGenerator generator) {
generator.models().cubeAll(this.getBaseName(), generator.modLoc("block/" + this.getBaseName()));
generator.models().cubeAll(this.getBaseName() + "_nether", generator.modLoc("block/" + this.getBaseName() + "_nether"));
}
}

View file

@ -1,8 +1,6 @@
package de.ellpeck.naturesaura.blocks; package de.ellpeck.naturesaura.blocks;
import de.ellpeck.naturesaura.Helper; import de.ellpeck.naturesaura.Helper;
import de.ellpeck.naturesaura.api.NaturesAuraAPI;
import de.ellpeck.naturesaura.api.aura.type.IAuraType;
import de.ellpeck.naturesaura.blocks.tiles.BlockEntityNatureAltar; import de.ellpeck.naturesaura.blocks.tiles.BlockEntityNatureAltar;
import de.ellpeck.naturesaura.blocks.tiles.ModBlockEntities; import de.ellpeck.naturesaura.blocks.tiles.ModBlockEntities;
import de.ellpeck.naturesaura.blocks.tiles.render.RenderNatureAltar; import de.ellpeck.naturesaura.blocks.tiles.render.RenderNatureAltar;
@ -14,29 +12,22 @@ import net.minecraft.core.BlockPos;
import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult; import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.context.BlockPlaceContext;
import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.Level; import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.BooleanProperty;
import net.minecraft.world.level.material.Material; import net.minecraft.world.level.material.Material;
import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShape;
import javax.annotation.Nullable;
public class BlockNatureAltar extends BlockContainerImpl implements ITESRProvider<BlockEntityNatureAltar>, ICustomBlockState { public class BlockNatureAltar extends BlockContainerImpl implements ITESRProvider<BlockEntityNatureAltar>, ICustomBlockState {
private static final VoxelShape SHAPE = Shapes.create(0, 0, 0, 1, 12 / 16F, 1); private static final VoxelShape SHAPE = Shapes.create(0, 0, 0, 1, 12 / 16F, 1);
public static final BooleanProperty NETHER = BooleanProperty.create("nether");
public BlockNatureAltar() { public BlockNatureAltar() {
super("nature_altar", BlockEntityNatureAltar.class, Block.Properties.of(Material.STONE).strength(4F)); super("nature_altar", BlockEntityNatureAltar.class, Block.Properties.of(Material.STONE).strength(4F));
this.registerDefaultState(this.defaultBlockState().setValue(BlockNatureAltar.NETHER, false));
} }
@Override @Override
@ -50,27 +41,13 @@ public class BlockNatureAltar extends BlockContainerImpl implements ITESRProvide
} }
@Override @Override
public InteractionResult use(BlockState state, Level levelIn, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) { public InteractionResult use(BlockState state, Level levelIn, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) {
return Helper.putStackOnTile(player, handIn, pos, 0, true); return Helper.putStackOnTile(player, handIn, pos, 0, true);
} }
@Override @Override
public void generateCustomBlockState(BlockStateGenerator generator) { public void generateCustomBlockState(BlockStateGenerator generator) {
// noop generator.simpleBlock(this, generator.models().getExistingFile(generator.modLoc(this.getBaseName())));
}
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
builder.add(BlockNatureAltar.NETHER);
}
@Nullable
@Override
public BlockState getStateForPlacement(BlockPlaceContext context) {
var nether = IAuraType.forLevel(context.getLevel()).isSimilar(NaturesAuraAPI.TYPE_NETHER);
return super.getStateForPlacement(context).setValue(BlockNatureAltar.NETHER, nether);
} }
@Override @Override

View file

@ -4,7 +4,6 @@ import de.ellpeck.naturesaura.NaturesAura;
import de.ellpeck.naturesaura.api.NaturesAuraAPI; import de.ellpeck.naturesaura.api.NaturesAuraAPI;
import de.ellpeck.naturesaura.api.multiblock.IMultiblock; import de.ellpeck.naturesaura.api.multiblock.IMultiblock;
import de.ellpeck.naturesaura.api.multiblock.Matcher; import de.ellpeck.naturesaura.api.multiblock.Matcher;
import de.ellpeck.naturesaura.blocks.BlockNatureAltar;
import de.ellpeck.naturesaura.blocks.ModBlocks; import de.ellpeck.naturesaura.blocks.ModBlocks;
import de.ellpeck.naturesaura.data.BlockTagProvider; import de.ellpeck.naturesaura.data.BlockTagProvider;
import de.ellpeck.naturesaura.recipes.ModRecipes; import de.ellpeck.naturesaura.recipes.ModRecipes;
@ -30,15 +29,6 @@ public final class Multiblocks {
'M', ModBlocks.GOLD_BRICK, 'M', ModBlocks.GOLD_BRICK,
'0', ModBlocks.NATURE_ALTAR, '0', ModBlocks.NATURE_ALTAR,
' ', Matcher.wildcard()); ' ', Matcher.wildcard());
public static final IMultiblock NETHER_ALTAR = NaturesAuraAPI.instance().createMultiblock(
new ResourceLocation(NaturesAura.MOD_ID, "nether_altar"),
Multiblocks.ALTAR_PATTERN,
'C', Blocks.RED_NETHER_BRICKS,
'B', Matcher.tag(Blocks.NETHER_BRICKS, BlockTagProvider.NETHER_ALTAR_STONE),
'W', Matcher.tag(Blocks.CRIMSON_PLANKS, BlockTagProvider.NETHER_ALTAR_WOOD),
'M', ModBlocks.GOLD_NETHER_BRICK,
'0', ModBlocks.NATURE_ALTAR.defaultBlockState().setValue(BlockNatureAltar.NETHER, true),
' ', Matcher.wildcard());
public static final IMultiblock TREE_RITUAL = NaturesAuraAPI.instance().createMultiblock( public static final IMultiblock TREE_RITUAL = NaturesAuraAPI.instance().createMultiblock(
new ResourceLocation(NaturesAura.MOD_ID, "tree_ritual"), new ResourceLocation(NaturesAura.MOD_ID, "tree_ritual"),
new String[][]{ new String[][]{

View file

@ -57,11 +57,10 @@ public class BlockEntityNatureAltar extends BlockEntityImpl implements ITickable
}; };
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public int bobTimer; public int bobTimer;
public StructureState structureState = StructureState.INVALID; public boolean isComplete;
private AltarRecipe currentRecipe; private AltarRecipe currentRecipe;
private int timer; private int timer;
private int lastAura; private int lastAura;
private boolean firstTick = true; private boolean firstTick = true;
@ -87,18 +86,18 @@ public class BlockEntityNatureAltar extends BlockEntityImpl implements ITickable
if (!this.level.isClientSide) { if (!this.level.isClientSide) {
if (this.level.getGameTime() % 40 == 0 || this.firstTick) { if (this.level.getGameTime() % 40 == 0 || this.firstTick) {
var newState = this.getNewState(); var complete = Multiblocks.ALTAR.isComplete(this.level, this.worldPosition);
if (newState != this.structureState) { if (complete != this.isComplete) {
this.structureState = newState; this.isComplete = complete;
this.sendToClients(); this.sendToClients();
} }
this.firstTick = false; this.firstTick = false;
} }
if (this.structureState != StructureState.INVALID) { if (this.isComplete) {
var type = IAuraType.forLevel(this.level);
var space = this.container.storeAura(300, true); var space = this.container.storeAura(300, true);
IAuraType expectedType = this.structureState == StructureState.NETHER ? NaturesAuraAPI.TYPE_NETHER : NaturesAuraAPI.TYPE_OVERWORLD; if (space > 0 && (type.isSimilar(NaturesAuraAPI.TYPE_OVERWORLD) || type.isSimilar(NaturesAuraAPI.TYPE_NETHER))) {
if (space > 0 && IAuraType.forLevel(this.level).isSimilar(expectedType)) {
var toStore = Math.min(IAuraChunk.getAuraInArea(this.level, this.worldPosition, 20), space); var toStore = Math.min(IAuraChunk.getAuraInArea(this.level, this.worldPosition, 20), space);
if (toStore > 0) { if (toStore > 0) {
var spot = IAuraChunk.getHighestSpot(this.level, this.worldPosition, 20, this.worldPosition); var spot = IAuraChunk.getHighestSpot(this.level, this.worldPosition, 20, this.worldPosition);
@ -167,7 +166,7 @@ public class BlockEntityNatureAltar extends BlockEntityImpl implements ITickable
this.sendToClients(); this.sendToClients();
} }
} else { } else {
if (this.structureState != StructureState.INVALID) { if (this.isComplete) {
if (rand.nextFloat() >= 0.7F) { if (rand.nextFloat() >= 0.7F) {
var fourths = this.container.getMaxAura() / 4; var fourths = this.container.getMaxAura() / 4;
if (this.container.getStoredAura() > 0) { if (this.container.getStoredAura() > 0) {
@ -199,33 +198,25 @@ public class BlockEntityNatureAltar extends BlockEntityImpl implements ITickable
} }
private AltarRecipe getRecipeForInput(ItemStack input) { private AltarRecipe getRecipeForInput(ItemStack input) {
var type = IAuraType.forLevel(this.level);
for (var recipe : this.level.getRecipeManager().getRecipesFor(ModRecipes.ALTAR_TYPE, null, null)) { for (var recipe : this.level.getRecipeManager().getRecipesFor(ModRecipes.ALTAR_TYPE, null, null)) {
if (recipe.input.test(input) && (recipe.requiredType == null || type.isSimilar(recipe.requiredType))) { if (recipe.input.test(input)) {
if (recipe.catalyst == Ingredient.EMPTY) if (recipe.catalyst == Ingredient.EMPTY)
return recipe; return recipe;
for (var stack : this.catalysts) for (var stack : this.catalysts) {
if (recipe.catalyst.test(stack)) if (recipe.catalyst.test(stack))
return recipe; return recipe;
}
} }
} }
return null; return null;
} }
private StructureState getNewState() {
if (Multiblocks.ALTAR.isComplete(this.level, this.worldPosition))
return StructureState.OVERWORLD;
if (Multiblocks.NETHER_ALTAR.isComplete(this.level, this.worldPosition))
return StructureState.NETHER;
return StructureState.INVALID;
}
@Override @Override
public void writeNBT(CompoundTag compound, SaveType type) { public void writeNBT(CompoundTag compound, SaveType type) {
super.writeNBT(compound, type); super.writeNBT(compound, type);
if (type != SaveType.BLOCK) { if (type != SaveType.BLOCK) {
compound.put("items", this.items.serializeNBT()); compound.put("items", this.items.serializeNBT());
compound.putString("state", this.structureState.name()); compound.putBoolean("complete", this.isComplete);
this.container.writeNBT(compound); this.container.writeNBT(compound);
} }
if (type == SaveType.TILE) { if (type == SaveType.TILE) {
@ -241,8 +232,7 @@ public class BlockEntityNatureAltar extends BlockEntityImpl implements ITickable
super.readNBT(compound, type); super.readNBT(compound, type);
if (type != SaveType.BLOCK) { if (type != SaveType.BLOCK) {
this.items.deserializeNBT(compound.getCompound("items")); this.items.deserializeNBT(compound.getCompound("items"));
if (compound.contains("state")) this.isComplete = compound.getBoolean("complete");
this.structureState = StructureState.valueOf(compound.getString("state"));
this.container.readNBT(compound); this.container.readNBT(compound);
} }
if (type == SaveType.TILE) { if (type == SaveType.TILE) {
@ -263,10 +253,4 @@ public class BlockEntityNatureAltar extends BlockEntityImpl implements ITickable
public IItemHandlerModifiable getItemHandler() { public IItemHandlerModifiable getItemHandler() {
return this.items; return this.items;
} }
public enum StructureState {
INVALID,
NETHER,
OVERWORLD
}
} }

View file

@ -51,7 +51,6 @@ public class AltarCategory implements IRecipeCategory<AltarRecipe> {
public void setRecipe(IRecipeLayoutBuilder builder, AltarRecipe recipe, IFocusGroup focuses) { public void setRecipe(IRecipeLayoutBuilder builder, AltarRecipe recipe, IFocusGroup focuses) {
builder.addSlot(RecipeIngredientRole.INPUT, 1, 19).addItemStacks(Arrays.asList(recipe.input.getItems())); builder.addSlot(RecipeIngredientRole.INPUT, 1, 19).addItemStacks(Arrays.asList(recipe.input.getItems()));
builder.addSlot(RecipeIngredientRole.OUTPUT, 81, 19).addItemStack(recipe.output); builder.addSlot(RecipeIngredientRole.OUTPUT, 81, 19).addItemStack(recipe.output);
builder.addSlot(RecipeIngredientRole.CATALYST, 27, 19).addItemStacks(recipe.catalyst == Ingredient.EMPTY ? Collections.singletonList(this.altar) : Arrays.asList(recipe.catalyst.getItems())); builder.addSlot(RecipeIngredientRole.CATALYST, 38, 19).addItemStacks(recipe.catalyst == Ingredient.EMPTY ? Collections.singletonList(this.altar) : Arrays.asList(recipe.catalyst.getItems()));
builder.addSlot(RecipeIngredientRole.CATALYST, 52, 19).addItemStack(recipe.requiredType != null ? recipe.getDimensionBottle() : ItemStack.EMPTY);
} }
} }

View file

@ -23,7 +23,6 @@ public class ProcessorAltar implements IComponentProcessor {
case "input" -> PatchouliCompat.ingredientVariable(this.recipe.input); case "input" -> PatchouliCompat.ingredientVariable(this.recipe.input);
case "output" -> IVariable.from(this.recipe.output); case "output" -> IVariable.from(this.recipe.output);
case "catalyst" -> this.recipe.catalyst != Ingredient.EMPTY ? PatchouliCompat.ingredientVariable(this.recipe.catalyst) : null; case "catalyst" -> this.recipe.catalyst != Ingredient.EMPTY ? PatchouliCompat.ingredientVariable(this.recipe.catalyst) : null;
case "type" -> this.recipe.requiredType != null ? IVariable.from(this.recipe.getDimensionBottle()) : null;
case "name" -> IVariable.wrap(this.recipe.output.getHoverName().getString()); case "name" -> IVariable.wrap(this.recipe.output.getHoverName().getString());
default -> null; default -> null;
}; };

View file

@ -1,13 +1,7 @@
package de.ellpeck.naturesaura.recipes; package de.ellpeck.naturesaura.recipes;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import de.ellpeck.naturesaura.NaturesAura;
import de.ellpeck.naturesaura.api.NaturesAuraAPI;
import de.ellpeck.naturesaura.api.aura.type.IAuraType;
import de.ellpeck.naturesaura.items.ItemAuraBottle;
import de.ellpeck.naturesaura.items.ModItems;
import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.Ingredient;
@ -21,16 +15,14 @@ public class AltarRecipe extends ModRecipe {
public final Ingredient input; public final Ingredient input;
public final ItemStack output; public final ItemStack output;
public final IAuraType requiredType;
public final Ingredient catalyst; public final Ingredient catalyst;
public final int aura; public final int aura;
public final int time; public final int time;
public AltarRecipe(ResourceLocation name, Ingredient input, ItemStack output, IAuraType requiredType, Ingredient catalyst, int aura, int time) { public AltarRecipe(ResourceLocation name, Ingredient input, ItemStack output, Ingredient catalyst, int aura, int time) {
super(name); super(name);
this.input = input; this.input = input;
this.output = output; this.output = output;
this.requiredType = requiredType;
this.catalyst = catalyst; this.catalyst = catalyst;
this.aura = aura; this.aura = aura;
this.time = time; this.time = time;
@ -51,12 +43,6 @@ public class AltarRecipe extends ModRecipe {
return ModRecipes.ALTAR_TYPE; return ModRecipes.ALTAR_TYPE;
} }
public ItemStack getDimensionBottle() {
var bottle = ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), this.requiredType);
bottle.setHoverName(Component.translatable("info." + NaturesAura.MOD_ID + ".required_aura_type." + this.requiredType.getName()));
return bottle;
}
public static class Serializer implements RecipeSerializer<AltarRecipe> { public static class Serializer implements RecipeSerializer<AltarRecipe> {
@Override @Override
@ -65,7 +51,6 @@ public class AltarRecipe extends ModRecipe {
recipeId, recipeId,
Ingredient.fromJson(json.getAsJsonObject("input")), Ingredient.fromJson(json.getAsJsonObject("input")),
CraftingHelper.getItemStack(json.getAsJsonObject("output"), true), CraftingHelper.getItemStack(json.getAsJsonObject("output"), true),
NaturesAuraAPI.AURA_TYPES.get(new ResourceLocation(json.get("aura_type").getAsString())),
json.has("catalyst") ? Ingredient.fromJson(json.getAsJsonObject("catalyst")) : Ingredient.EMPTY, json.has("catalyst") ? Ingredient.fromJson(json.getAsJsonObject("catalyst")) : Ingredient.EMPTY,
json.get("aura").getAsInt(), json.get("aura").getAsInt(),
json.get("time").getAsInt()); json.get("time").getAsInt());
@ -78,7 +63,6 @@ public class AltarRecipe extends ModRecipe {
recipeId, recipeId,
Ingredient.fromNetwork(buffer), Ingredient.fromNetwork(buffer),
buffer.readItem(), buffer.readItem(),
NaturesAuraAPI.AURA_TYPES.get(buffer.readResourceLocation()),
Ingredient.fromNetwork(buffer), Ingredient.fromNetwork(buffer),
buffer.readInt(), buffer.readInt(),
buffer.readInt()); buffer.readInt());
@ -88,7 +72,6 @@ public class AltarRecipe extends ModRecipe {
public void toNetwork(FriendlyByteBuf buffer, AltarRecipe recipe) { public void toNetwork(FriendlyByteBuf buffer, AltarRecipe recipe) {
recipe.input.toNetwork(buffer); recipe.input.toNetwork(buffer);
buffer.writeItem(recipe.output); buffer.writeItem(recipe.output);
buffer.writeResourceLocation(recipe.requiredType.getName());
recipe.catalyst.toNetwork(buffer); recipe.catalyst.toNetwork(buffer);
buffer.writeInt(recipe.aura); buffer.writeInt(recipe.aura);
buffer.writeInt(recipe.time); buffer.writeInt(recipe.time);

View file

@ -82,8 +82,8 @@ public final class ModRegistry {
new BlockFurnaceHeater(), new BlockFurnaceHeater(),
new BlockPotionGenerator(), new BlockPotionGenerator(),
new BlockAuraDetector(), new BlockAuraDetector(),
new BlockCatalyst("conversion_catalyst", Block.Properties.of(Material.STONE).sound(SoundType.STONE).strength(2.5F)), new BlockImpl("conversion_catalyst", Block.Properties.of(Material.STONE).sound(SoundType.STONE).strength(2.5F)),
new BlockCatalyst("crushing_catalyst", Block.Properties.of(Material.STONE).sound(SoundType.STONE).strength(2.5F)), new BlockImpl("crushing_catalyst", Block.Properties.of(Material.STONE).sound(SoundType.STONE).strength(2.5F)),
new BlockFlowerGenerator(), new BlockFlowerGenerator(),
new BlockPlacer(), new BlockPlacer(),
new BlockHopperUpgrade(), new BlockHopperUpgrade(),

View file

@ -1,10 +0,0 @@
{
"variants": {
"nether=false": {
"model": "naturesaura:block/conversion_catalyst"
},
"nether=true": {
"model": "naturesaura:block/conversion_catalyst_nether"
}
}
}

View file

@ -1,10 +0,0 @@
{
"variants": {
"nether=false": {
"model": "naturesaura:block/crushing_catalyst"
},
"nether=true": {
"model": "naturesaura:block/crushing_catalyst_nether"
}
}
}

View file

@ -1,10 +0,0 @@
{
"variants": {
"nether=false": {
"model": "naturesaura:block/nature_altar"
},
"nether=true": {
"model": "naturesaura:block/nature_altar_nether"
}
}
}

View file

@ -1,33 +0,0 @@
{
"name": "The Crimson Altar",
"icon": "naturesaura:nature_altar",
"category": "naturesaura:using",
"advancement": "naturesaura:aura_bottle_nether",
"priority": true,
"turnin": "naturesaura:tainted_gold",
"pages": [
{
"type": "text",
"text": "The $(l:using/altar)Natural Altar$(), while having the ability to turn iron into $(item)Infused Iron$(), does not fare well in different regions, specifically the $(thing)Nether$(), where a much darker type of $(aura) is present. Here, the $(item)Crimson Altar$() can be built. A structure very similar to the $(thing)Natural Altar$(), which is able to, instead, turn $(item)Gold$() into $(item)Tainted Gold$(). For this, the structure on the following page needs to be assembled."
},
{
"type": "text",
"text": "It should be noted that, while looking different, the $(item)Crimson Altar$() itself is in fact not a different block - it is merely the $(item)Natural Altar$()'s appearance in an area where ghostly $(aura) is present, caused by its inherent magical infusion with $(aura). Similar can be said for any $(item)Catalysts$(): Merely placing them on top of the crimson altar will cause their ghostly recipes to work as well."
},
{
"type": "multiblock",
"multiblock_id": "naturesaura:nether_altar",
"text": "How to assemble the $(item)Crimson Altar$(). The $(item)Crimson Planks$() can be replaced with $(item)Warped Planks$()."
},
{
"type": "crafting",
"recipe": "naturesaura:gold_nether_brick",
"text": "Creating the $(item)Golden Nether Bricks$() that are used in the $(item)Crimson Altar$()'s multiblock"
},
{
"type": "naturesaura:altar",
"text": "Creating $(item)Tainted Gold$(), a material blessed with the powers of ghostly $(aura).$(br)Note that the same infusion is possible using the materials' block form.",
"recipe": "naturesaura:tainted_gold"
}
]
}

View file

@ -18,20 +18,14 @@
"group": "catalyst", "group": "catalyst",
"type": "patchouli:item", "type": "patchouli:item",
"item": "#catalyst", "item": "#catalyst",
"x": 36, "x": 48,
"y": 26
},
{
"type": "patchouli:item",
"item": "#type",
"x": 58,
"y": 26 "y": 26
}, },
{ {
"group": "altar", "group": "altar",
"type": "patchouli:item", "type": "patchouli:item",
"item": "naturesaura:nature_altar", "item": "naturesaura:nature_altar",
"x": 36, "x": 48,
"y": 26 "y": 26
}, },
{ {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 B

View file

@ -6,7 +6,6 @@
"output": { "output": {
"item": "minecraft:spectral_arrow" "item": "minecraft:spectral_arrow"
}, },
"aura_type": "naturesaura:overworld",
"catalyst": { "catalyst": {
"item": "naturesaura:conversion_catalyst" "item": "naturesaura:conversion_catalyst"
}, },

View file

@ -7,7 +7,6 @@
"item": "minecraft:blaze_powder", "item": "minecraft:blaze_powder",
"count": 4 "count": 4
}, },
"aura_type": "naturesaura:nether",
"catalyst": { "catalyst": {
"item": "naturesaura:crushing_catalyst" "item": "naturesaura:crushing_catalyst"
}, },

View file

@ -7,7 +7,6 @@
"item": "minecraft:bone_meal", "item": "minecraft:bone_meal",
"count": 6 "count": 6
}, },
"aura_type": "naturesaura:overworld",
"catalyst": { "catalyst": {
"item": "naturesaura:crushing_catalyst" "item": "naturesaura:crushing_catalyst"
}, },

View file

@ -9,7 +9,6 @@
"output": { "output": {
"item": "minecraft:dragon_breath" "item": "minecraft:dragon_breath"
}, },
"aura_type": "naturesaura:nether",
"catalyst": { "catalyst": {
"item": "naturesaura:conversion_catalyst" "item": "naturesaura:conversion_catalyst"
}, },

View file

@ -6,7 +6,6 @@
"output": { "output": {
"item": "minecraft:chorus_flower" "item": "minecraft:chorus_flower"
}, },
"aura_type": "naturesaura:overworld",
"catalyst": { "catalyst": {
"item": "naturesaura:conversion_catalyst" "item": "naturesaura:conversion_catalyst"
}, },

View file

@ -6,7 +6,6 @@
"output": { "output": {
"item": "minecraft:coal" "item": "minecraft:coal"
}, },
"aura_type": "naturesaura:overworld",
"catalyst": { "catalyst": {
"item": "naturesaura:conversion_catalyst" "item": "naturesaura:conversion_catalyst"
}, },

View file

@ -6,7 +6,6 @@
"output": { "output": {
"item": "minecraft:crimson_fungus" "item": "minecraft:crimson_fungus"
}, },
"aura_type": "naturesaura:nether",
"catalyst": { "catalyst": {
"item": "naturesaura:conversion_catalyst" "item": "naturesaura:conversion_catalyst"
}, },

View file

@ -6,7 +6,6 @@
"output": { "output": {
"item": "minecraft:egg" "item": "minecraft:egg"
}, },
"aura_type": "naturesaura:overworld",
"catalyst": { "catalyst": {
"item": "naturesaura:conversion_catalyst" "item": "naturesaura:conversion_catalyst"
}, },

View file

@ -6,7 +6,6 @@
"output": { "output": {
"item": "minecraft:fermented_spider_eye" "item": "minecraft:fermented_spider_eye"
}, },
"aura_type": "naturesaura:overworld",
"catalyst": { "catalyst": {
"item": "naturesaura:conversion_catalyst" "item": "naturesaura:conversion_catalyst"
}, },

View file

@ -6,7 +6,6 @@
"output": { "output": {
"item": "minecraft:gilded_blackstone" "item": "minecraft:gilded_blackstone"
}, },
"aura_type": "naturesaura:nether",
"catalyst": { "catalyst": {
"item": "naturesaura:conversion_catalyst" "item": "naturesaura:conversion_catalyst"
}, },

View file

@ -7,7 +7,6 @@
"item": "minecraft:glowstone_dust", "item": "minecraft:glowstone_dust",
"count": 4 "count": 4
}, },
"aura_type": "naturesaura:nether",
"catalyst": { "catalyst": {
"item": "naturesaura:crushing_catalyst" "item": "naturesaura:crushing_catalyst"
}, },

View file

@ -7,7 +7,6 @@
"item": "naturesaura:gold_powder", "item": "naturesaura:gold_powder",
"count": 4 "count": 4
}, },
"aura_type": "naturesaura:overworld",
"catalyst": { "catalyst": {
"item": "naturesaura:crushing_catalyst" "item": "naturesaura:crushing_catalyst"
}, },

View file

@ -6,7 +6,6 @@
"output": { "output": {
"item": "naturesaura:infused_iron" "item": "naturesaura:infused_iron"
}, },
"aura_type": "naturesaura:overworld",
"aura": 15000, "aura": 15000,
"time": 80 "time": 80
} }

View file

@ -6,7 +6,6 @@
"output": { "output": {
"item": "naturesaura:infused_iron_block" "item": "naturesaura:infused_iron_block"
}, },
"aura_type": "naturesaura:overworld",
"aura": 135000, "aura": 135000,
"time": 700 "time": 700
} }

View file

@ -6,7 +6,6 @@
"output": { "output": {
"item": "naturesaura:infused_stone" "item": "naturesaura:infused_stone"
}, },
"aura_type": "naturesaura:overworld",
"aura": 7500, "aura": 7500,
"time": 40 "time": 40
} }

View file

@ -6,7 +6,6 @@
"output": { "output": {
"item": "minecraft:lead" "item": "minecraft:lead"
}, },
"aura_type": "naturesaura:overworld",
"catalyst": { "catalyst": {
"item": "naturesaura:conversion_catalyst" "item": "naturesaura:conversion_catalyst"
}, },

View file

@ -6,7 +6,6 @@
"output": { "output": {
"item": "minecraft:leather" "item": "minecraft:leather"
}, },
"aura_type": "naturesaura:overworld",
"catalyst": { "catalyst": {
"item": "naturesaura:conversion_catalyst" "item": "naturesaura:conversion_catalyst"
}, },

View file

@ -6,7 +6,6 @@
"output": { "output": {
"item": "minecraft:milk_bucket" "item": "minecraft:milk_bucket"
}, },
"aura_type": "naturesaura:overworld",
"catalyst": { "catalyst": {
"item": "naturesaura:conversion_catalyst" "item": "naturesaura:conversion_catalyst"
}, },

View file

@ -6,7 +6,6 @@
"output": { "output": {
"item": "minecraft:nether_wart" "item": "minecraft:nether_wart"
}, },
"aura_type": "naturesaura:nether",
"catalyst": { "catalyst": {
"item": "naturesaura:conversion_catalyst" "item": "naturesaura:conversion_catalyst"
}, },

View file

@ -6,7 +6,6 @@
"output": { "output": {
"item": "minecraft:potato" "item": "minecraft:potato"
}, },
"aura_type": "naturesaura:overworld",
"catalyst": { "catalyst": {
"item": "naturesaura:conversion_catalyst" "item": "naturesaura:conversion_catalyst"
}, },

View file

@ -6,7 +6,6 @@
"output": { "output": {
"item": "minecraft:prismarine_shard" "item": "minecraft:prismarine_shard"
}, },
"aura_type": "naturesaura:overworld",
"catalyst": { "catalyst": {
"item": "naturesaura:conversion_catalyst" "item": "naturesaura:conversion_catalyst"
}, },

View file

@ -6,7 +6,6 @@
"output": { "output": {
"item": "minecraft:prismarine_crystals" "item": "minecraft:prismarine_crystals"
}, },
"aura_type": "naturesaura:nether",
"catalyst": { "catalyst": {
"item": "naturesaura:conversion_catalyst" "item": "naturesaura:conversion_catalyst"
}, },

View file

@ -6,7 +6,6 @@
"output": { "output": {
"item": "minecraft:rabbit_foot" "item": "minecraft:rabbit_foot"
}, },
"aura_type": "naturesaura:nether",
"catalyst": { "catalyst": {
"item": "naturesaura:conversion_catalyst" "item": "naturesaura:conversion_catalyst"
}, },

View file

@ -6,7 +6,6 @@
"output": { "output": {
"item": "minecraft:sand" "item": "minecraft:sand"
}, },
"aura_type": "naturesaura:overworld",
"catalyst": { "catalyst": {
"item": "naturesaura:crushing_catalyst" "item": "naturesaura:crushing_catalyst"
}, },

View file

@ -6,7 +6,6 @@
"output": { "output": {
"item": "minecraft:soul_sand" "item": "minecraft:soul_sand"
}, },
"aura_type": "naturesaura:nether",
"catalyst": { "catalyst": {
"item": "naturesaura:conversion_catalyst" "item": "naturesaura:conversion_catalyst"
}, },

View file

@ -7,7 +7,6 @@
"item": "minecraft:sugar", "item": "minecraft:sugar",
"count": 3 "count": 3
}, },
"aura_type": "naturesaura:overworld",
"catalyst": { "catalyst": {
"item": "naturesaura:crushing_catalyst" "item": "naturesaura:crushing_catalyst"
}, },

View file

@ -6,7 +6,6 @@
"output": { "output": {
"item": "naturesaura:tainted_gold" "item": "naturesaura:tainted_gold"
}, },
"aura_type": "naturesaura:nether",
"aura": 15000, "aura": 15000,
"time": 80 "time": 80
} }

View file

@ -6,7 +6,6 @@
"output": { "output": {
"item": "naturesaura:tainted_gold_block" "item": "naturesaura:tainted_gold_block"
}, },
"aura_type": "naturesaura:nether",
"aura": 135000, "aura": 135000,
"time": 700 "time": 700
} }

View file

@ -6,7 +6,6 @@
"output": { "output": {
"item": "minecraft:warped_fungus" "item": "minecraft:warped_fungus"
}, },
"aura_type": "naturesaura:nether",
"catalyst": { "catalyst": {
"item": "naturesaura:conversion_catalyst" "item": "naturesaura:conversion_catalyst"
}, },

View file

@ -9,7 +9,6 @@
}, },
"item": "minecraft:potion" "item": "minecraft:potion"
}, },
"aura_type": "naturesaura:overworld",
"catalyst": { "catalyst": {
"item": "naturesaura:conversion_catalyst" "item": "naturesaura:conversion_catalyst"
}, },