Finished the Augments for the Serenade of the Nether.
This commit is contained in:
parent
77b5f898ca
commit
5743d9f475
|
@ -2,7 +2,7 @@
|
|||
Version 2.1.0-67
|
||||
------------------------------------------------------
|
||||
- Added the Destructive Will effect to the Ritual of the Green Grove. This ritual now is done~
|
||||
- Added more augmentations for the Lava Ritual.
|
||||
- Finished the Augments for the Serenade of the Nether.
|
||||
- Implemented a new model for the Blood Altar to be more in-line with the rest of the mod (Thanks, wiiv!)
|
||||
- Made the Blood Altar respect the new capability system for fluid management.
|
||||
|
||||
|
|
|
@ -9,11 +9,16 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TextComponentTranslation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||
import net.minecraftforge.fluids.capability.IFluidHandler;
|
||||
import WayofTime.bloodmagic.api.BloodMagicAPI;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.api.ritual.AreaDescriptor;
|
||||
|
@ -35,6 +40,8 @@ public class RitualLava extends Ritual
|
|||
public static final String FIRE_FUSE_RANGE = "fireFuse";
|
||||
public static final String FIRE_RESIST_RANGE = "fireResist";
|
||||
public static final String FIRE_DAMAGE_RANGE = "fireDamage";
|
||||
public static final String LAVA_TANK_RANGE = "lavaTank";
|
||||
|
||||
public static final double vengefulWillDrain = 1;
|
||||
public static final double steadfastWillDrain = 0.5;
|
||||
public static final double corrosiveWillDrain = 0.2;
|
||||
|
@ -49,10 +56,13 @@ public class RitualLava extends Ritual
|
|||
addBlockRange(FIRE_FUSE_RANGE, new AreaDescriptor.Rectangle(new BlockPos(-2, -2, -2), 5));
|
||||
addBlockRange(FIRE_RESIST_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 0, 0), 1));
|
||||
addBlockRange(FIRE_DAMAGE_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 0, 0), 1));
|
||||
addBlockRange(LAVA_TANK_RANGE, new AreaDescriptor.Rectangle(new BlockPos(0, 1, 0), 1));
|
||||
|
||||
setMaximumVolumeAndDistanceOfRange(LAVA_RANGE, 9, 3, 3);
|
||||
setMaximumVolumeAndDistanceOfRange(FIRE_FUSE_RANGE, 0, 10, 10);
|
||||
setMaximumVolumeAndDistanceOfRange(FIRE_RESIST_RANGE, 0, 10, 10);
|
||||
setMaximumVolumeAndDistanceOfRange(FIRE_DAMAGE_RANGE, 0, 10, 10);
|
||||
setMaximumVolumeAndDistanceOfRange(LAVA_TANK_RANGE, 1, 10, 10);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -107,6 +117,34 @@ public class RitualLava extends Ritual
|
|||
}
|
||||
}
|
||||
|
||||
if (rawWill > 0)
|
||||
{
|
||||
AreaDescriptor chestRange = getBlockRange(LAVA_TANK_RANGE);
|
||||
TileEntity tile = world.getTileEntity(chestRange.getContainedPositions(pos).get(0));
|
||||
double drain = getWillCostForRawWill(rawWill);
|
||||
int lpCost = getLPCostForRawWill(rawWill);
|
||||
|
||||
if (rawWill >= drain && currentEssence >= lpCost)
|
||||
{
|
||||
if (tile != null)
|
||||
{
|
||||
if (tile.hasCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, null))
|
||||
{
|
||||
IFluidHandler handler = tile.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, null);
|
||||
double filled = handler.fill(new FluidStack(FluidRegistry.LAVA, 1000), true);
|
||||
|
||||
double ratio = filled / 1000;
|
||||
|
||||
rawWill -= drain * ratio;
|
||||
rawDrained += drain * ratio;
|
||||
|
||||
currentEssence -= Math.ceil(lpCost * ratio);
|
||||
lpDrain += Math.ceil(lpCost * ratio);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
double vengefulWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.VENGEFUL, willConfig);
|
||||
double steadfastWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.STEADFAST, willConfig);
|
||||
double corrosiveWill = this.getWillRespectingConfig(world, pos, EnumDemonWillType.CORROSIVE, willConfig);
|
||||
|
|
|
@ -649,6 +649,7 @@ ritual.BloodMagic.meteorRitual.info=Consumes an item inside of its item range to
|
|||
|
||||
ritual.BloodMagic.waterRitual.waterRange.info=(Water) The area that the ritual will place water source blocks.
|
||||
ritual.BloodMagic.lavaRitual.lavaRange.info=(Lava) The area that the ritual will place lava source blocks.
|
||||
ritual.BloodMagic.lavaRitual.lavaTank.info=(Raw) The tank that the ritual will place lava into.
|
||||
ritual.BloodMagic.lavaRitual.fireFuse.info=(Vengeful) Entities in this range are afflicted by Fire Fuse.
|
||||
ritual.BloodMagic.lavaRitual.fireResist.info=(Steadfast) Players in this range have Fire Resist applied.
|
||||
ritual.BloodMagic.lavaRitual.fireDamage.info=(Corrosive) Entities within this range that are immune to fire damage are hurt proportional to the Will.
|
||||
|
|
Loading…
Reference in a new issue