fixed armorer's aid not allowing raw ores to be duplicated

Closes #277
This commit is contained in:
Ell 2022-09-30 15:27:17 +02:00
parent 13f3b75df6
commit 52512b5062
2 changed files with 4 additions and 3 deletions

View file

@ -10,6 +10,7 @@ import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.item.crafting.Recipe; import net.minecraft.world.item.crafting.Recipe;
import net.minecraft.world.level.block.entity.BlastFurnaceBlockEntity; import net.minecraft.world.level.block.entity.BlastFurnaceBlockEntity;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.common.Tags;
import net.minecraftforge.common.capabilities.ForgeCapabilities; import net.minecraftforge.common.capabilities.ForgeCapabilities;
import net.minecraftforge.items.IItemHandlerModifiable; import net.minecraftforge.items.IItemHandlerModifiable;
@ -68,7 +69,7 @@ public class BlockEntityBlastFurnaceBooster extends BlockEntityImpl implements I
private boolean isApplicable(List<Ingredient> ingredients) { private boolean isApplicable(List<Ingredient> ingredients) {
for (var ing : ingredients) { for (var ing : ingredients) {
for (var stack : ing.getItems()) { for (var stack : ing.getItems()) {
if (stack.getTags().anyMatch(t -> t.location().getPath().startsWith("ores/"))) if (stack.is(Tags.Items.ORES) || stack.is(Tags.Items.RAW_MATERIALS))
return true; return true;
} }
} }

View file

@ -65,8 +65,8 @@ public class BlockEntityFurnaceHeater extends BlockEntityImpl implements ITickab
this.level.setBlockAndUpdate(tilePos, this.level.getBlockState(tilePos).setValue(AbstractFurnaceBlock.LIT, true)); this.level.setBlockAndUpdate(tilePos, this.level.getBlockState(tilePos).setValue(AbstractFurnaceBlock.LIT, true));
data.set(0, 200); data.set(0, 200);
//if set higher than 199, it'll never finish because the furnace does ++ and then == // we leave some wiggle room for the furnace to do its own checks + the blast furnace booster
data.set(2, Math.min(data.get(3) - 1, data.get(2) + 5)); data.set(2, Math.min(data.get(3) - 2, data.get(2) + 5));
var spot = IAuraChunk.getHighestSpot(this.level, this.worldPosition, 20, this.worldPosition); var spot = IAuraChunk.getHighestSpot(this.level, this.worldPosition, 20, this.worldPosition);
var chunk = IAuraChunk.getAuraChunk(this.level, spot); var chunk = IAuraChunk.getAuraChunk(this.level, spot);