Lava now works for blast furnace. Closes #1800

This commit is contained in:
drcrazy 2019-08-20 02:52:16 +03:00
parent 5bac19e302
commit 21d77a2d7d
2 changed files with 6 additions and 5 deletions

View file

@ -83,8 +83,8 @@ public class IndustrialBlastFurnaceBlockEntity extends GenericMachineBlockEntity
heat += BlockMachineCasing.getHeatFromState(part.getCachedState()); heat += BlockMachineCasing.getHeatFromState(part.getCachedState());
} }
if (world.getBlockState(location.offset(Direction.UP, 1)).getBlock().getTranslationKey().equals("blockEntity.lava") if (world.getBlockState(location.offset(Direction.UP, 1)).getMaterial().equals(Material.LAVA)
&& world.getBlockState(location.offset(Direction.UP, 2)).getBlock().getTranslationKey().equals("blockEntity.lava")) { && world.getBlockState(location.offset(Direction.UP, 2)).getMaterial().equals(Material.LAVA)) {
heat += 500; heat += 500;
} }
return heat; return heat;

View file

@ -26,6 +26,7 @@ package techreborn.multiblocks;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.Material;
import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.BlockEntity;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
@ -323,10 +324,10 @@ public class MultiBlockCasing extends RectangularMultiblockControllerBase {
@Override @Override
protected void isBlockGoodForInterior(World world, int x, int y, int z) throws MultiblockValidationException { protected void isBlockGoodForInterior(World world, int x, int y, int z) throws MultiblockValidationException {
BlockState state = world.getBlockState(new BlockPos(x, y, z)); BlockState state = world.getBlockState(new BlockPos(x, y, z));
Block block = state.getBlock();
if (state.isAir()) {
} else if (block.getTranslationKey().equals("blockEntity.lava")) { if (state.getMaterial().equals(Material.AIR)) {
} else if (state.getMaterial().equals(Material.LAVA)) {
hasLava = true; hasLava = true;
} else { } else {
super.isBlockGoodForInterior(world, x, y, z); super.isBlockGoodForInterior(world, x, y, z);