From 0ef69b05609fe021b5f8cc2a677d01b805153fe9 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Tue, 25 Feb 2020 23:14:19 +0100 Subject: [PATCH] use isSimilar over isPresentInWorld --- .../naturesaura/blocks/tiles/TileEntityNatureAltar.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityNatureAltar.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityNatureAltar.java index 57b48c20..65d72cda 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityNatureAltar.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityNatureAltar.java @@ -100,7 +100,7 @@ public class TileEntityNatureAltar extends TileEntityImpl implements ITickableTi if (this.structureState != StructureState.INVALID) { int space = this.container.storeAura(300, true); IAuraType expectedType = this.structureState == StructureState.NETHER ? NaturesAuraAPI.TYPE_NETHER : NaturesAuraAPI.TYPE_OVERWORLD; - if (space > 0 && expectedType.isPresentInWorld(this.world)) { + if (space > 0 && IAuraType.forWorld(this.world).isSimilar(expectedType)) { int toStore = Math.min(IAuraChunk.getAuraInArea(this.world, this.pos, 20), space); if (toStore > 0) { BlockPos spot = IAuraChunk.getHighestSpot(this.world, this.pos, 20, this.pos); @@ -202,8 +202,9 @@ public class TileEntityNatureAltar extends TileEntityImpl implements ITickableTi } private AltarRecipe getRecipeForInput(ItemStack input) { + IAuraType type = IAuraType.forWorld(this.world); for (AltarRecipe recipe : NaturesAuraAPI.ALTAR_RECIPES.values()) { - if (recipe.input.test(input) && (recipe.requiredType == null || recipe.requiredType.isPresentInWorld(this.world))) { + if (recipe.input.test(input) && (recipe.requiredType == null || type.isSimilar(recipe.requiredType))) { if (recipe.catalyst == Ingredient.EMPTY) return recipe; for (ItemStack stack : this.catalysts)