diff --git a/src/main/java/WayofTime/bloodmagic/ritual/types/RitualLava.java b/src/main/java/WayofTime/bloodmagic/ritual/types/RitualLava.java index d9c67d1a..2bddc06b 100644 --- a/src/main/java/WayofTime/bloodmagic/ritual/types/RitualLava.java +++ b/src/main/java/WayofTime/bloodmagic/ritual/types/RitualLava.java @@ -1,12 +1,12 @@ package WayofTime.bloodmagic.ritual.types; import WayofTime.bloodmagic.BloodMagic; -import WayofTime.bloodmagic.ritual.*; -import WayofTime.bloodmagic.util.DamageSourceBloodMagic; -import WayofTime.bloodmagic.soul.DemonWillHolder; -import WayofTime.bloodmagic.soul.EnumDemonWillType; import WayofTime.bloodmagic.core.RegistrarBloodMagic; import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler; +import WayofTime.bloodmagic.ritual.*; +import WayofTime.bloodmagic.soul.DemonWillHolder; +import WayofTime.bloodmagic.soul.EnumDemonWillType; +import WayofTime.bloodmagic.util.DamageSourceBloodMagic; import WayofTime.bloodmagic.util.Utils; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; @@ -85,7 +85,7 @@ public class RitualLava extends Ritual { for (BlockPos newPos : lavaRange.getContainedPositions(pos)) { IBlockState state = world.getBlockState(newPos); - if (world.isAirBlock(newPos) || Utils.isFlowingLiquid(world, newPos, state)) { + if (world.isAirBlock(newPos) || Utils.isFlowingLiquid(state)) { int lpCost = getLPCostForRawWill(rawWill); if (currentEssence < lpCost) { break; diff --git a/src/main/java/WayofTime/bloodmagic/util/Utils.java b/src/main/java/WayofTime/bloodmagic/util/Utils.java index 90f1d312..26a42fa4 100644 --- a/src/main/java/WayofTime/bloodmagic/util/Utils.java +++ b/src/main/java/WayofTime/bloodmagic/util/Utils.java @@ -1,16 +1,15 @@ package WayofTime.bloodmagic.util; import WayofTime.bloodmagic.altar.ComponentType; -import WayofTime.bloodmagic.iface.IDemonWillViewer; -import WayofTime.bloodmagic.util.helper.NBTHelper; import WayofTime.bloodmagic.core.RegistrarBloodMagicBlocks; +import WayofTime.bloodmagic.iface.IDemonWillViewer; import WayofTime.bloodmagic.network.BloodMagicPacketHandler; import WayofTime.bloodmagic.network.PlayerVelocityPacketProcessor; import WayofTime.bloodmagic.tile.TileInventory; +import WayofTime.bloodmagic.util.helper.NBTHelper; import com.google.common.collect.Iterables; import com.google.common.collect.Maps; import net.minecraft.block.Block; -import net.minecraft.block.BlockLiquid; import net.minecraft.block.BlockPortal; import net.minecraft.block.state.IBlockState; import net.minecraft.enchantment.EnchantmentHelper; @@ -42,7 +41,6 @@ import net.minecraftforge.common.ISpecialArmor; import net.minecraftforge.common.ISpecialArmor.ArmorProperties; import net.minecraftforge.fluids.IFluidBlock; import net.minecraftforge.fml.common.ObfuscationReflectionHelper; -import net.minecraftforge.fml.relauncher.ReflectionHelper; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.ItemHandlerHelper; @@ -799,9 +797,9 @@ public class Utils { return (state instanceof IFluidBlock || state.getMaterial().isLiquid()); } - public static boolean isFlowingLiquid(World world, BlockPos pos, IBlockState state) { + public static boolean isFlowingLiquid(IBlockState state) { Block block = state.getBlock(); - return ((block instanceof IFluidBlock && Math.abs(((IFluidBlock) block).getFilledPercentage(world, pos)) == 1) || (block instanceof BlockLiquid && block.getMetaFromState(state) != 0)); + return isBlockLiquid(state) && !(state == block.getDefaultState()); } public static boolean spawnStackAtBlock(World world, BlockPos pos, @Nullable EnumFacing pushDirection, ItemStack stack) {