Added WoS reagent use, general touch ups.
This commit is contained in:
parent
efa5d89539
commit
f2b4f3db9e
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
#Sat Apr 11 18:01:40 EDT 2015
|
||||
#Sun Apr 12 20:13:33 EDT 2015
|
||||
mod_name=BloodMagic
|
||||
forge_version=10.13.2.1232
|
||||
ccc_version=1.0.4.29
|
||||
|
@ -8,5 +8,5 @@ nei_version=1.0.3.64
|
|||
package_group=com.wayoftime.bloodmagic
|
||||
mod_version=1.3.2Beta
|
||||
minetweaker_version=Dev-1.7.10-3.0.9B
|
||||
build_number=2
|
||||
mc_version=1.7.10
|
||||
build_number=3
|
||||
|
|
|
@ -1095,7 +1095,11 @@ public class AlchemicalWizardry
|
|||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.mycelium, 1, 0), 5, new ItemStack[]{new ItemStack(Blocks.grass), new ItemStack(Blocks.brown_mushroom), new ItemStack(Blocks.red_mushroom)}, 2);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Blocks.ice), 2, new ItemStack[]{waterBucketStack, new ItemStack(Items.snowball)}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.potionitem, 1, 0), 1, new ItemStack[]{new ItemStack(Items.glass_bottle), new ItemStack(Blocks.cactus)}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(waterBucketStack, 1, new ItemStack[]{emptyBucketStack, new ItemStack(Blocks.cactus)}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.glass_bottle, 3), 1, new ItemStack[]{glassStack, glassStack, glassStack}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.ghast_tear, 2), 100, new ItemStack[]{ghastTearStack, concentratedCatalystStack, weakBloodShardStack, new ItemStack(Blocks.soul_sand), new ItemStack(Blocks.soul_sand)}, 5);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.coal, 5), 1, new ItemStack[]{new ItemStack(Items.coal, 1, 1), new ItemStack(Items.coal, 1, 1), new ItemStack(Items.coal, 1, 1), new ItemStack(Items.coal, 1, 1), new ItemStack(Items.coal, 1, 1)}, 1);
|
||||
AlchemyRecipeRegistry.registerRecipe(new ItemStack(Items.clay_ball, 4), 5, new ItemStack[]{new ItemStack(Blocks.sand), waterBucketStack}, 2);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
|
|
@ -105,8 +105,13 @@ public class AlchemicalWizardryEventHooks
|
|||
@SubscribeEvent(priority=EventPriority.HIGHEST)
|
||||
public void onLivingHurtEvent(LivingHurtEvent event)
|
||||
{
|
||||
System.out.println("IsRemote: " + event.entity.worldObj.isRemote);
|
||||
if(!event.isCanceled() && event.entityLiving instanceof EntityPlayer && !event.entityLiving.worldObj.isRemote)
|
||||
{
|
||||
if(event.entityLiving.getHealth() > event.entityLiving.getMaxHealth())
|
||||
{
|
||||
event.entityLiving.setHealth(event.entityLiving.getMaxHealth());
|
||||
}
|
||||
EntityPlayer player = (EntityPlayer)event.entityLiving;
|
||||
|
||||
float prevHp = APISpellHelper.getCurrentAdditionalHP((EntityPlayer)event.entityLiving);
|
||||
|
@ -155,7 +160,7 @@ public class AlchemicalWizardryEventHooks
|
|||
|
||||
if(event.ammount <= 0.3)
|
||||
{
|
||||
if(rand.nextInt(10) == 0)
|
||||
// if(rand.nextInt(10) == 0)
|
||||
{
|
||||
event.ammount++;
|
||||
}
|
||||
|
@ -216,6 +221,13 @@ public class AlchemicalWizardryEventHooks
|
|||
}
|
||||
}
|
||||
}
|
||||
}else
|
||||
{
|
||||
reagentAmount = 0;
|
||||
APISpellHelper.setPlayerMaxReagentAmount(player, 0);
|
||||
NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getReagentBarPacket(null, 0, 0), (EntityPlayerMP)player);
|
||||
APISpellHelper.setCurrentAdditionalHP(player, 0);
|
||||
NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getAddedHPPacket(0, 0), (EntityPlayerMP)player);
|
||||
}
|
||||
//Consumes the amount
|
||||
float costPerTick = parad.getCostPerTickOfUse(player);
|
||||
|
@ -238,14 +250,22 @@ public class AlchemicalWizardryEventHooks
|
|||
|
||||
if(reagentAmount <= 0)
|
||||
{
|
||||
boolean hasRevertedArmour = false;
|
||||
ItemStack[] armourInventory = player.inventory.armorInventory;
|
||||
for(ItemStack stack : armourInventory)
|
||||
{
|
||||
if(stack != null && stack.getItem() instanceof OmegaArmour)
|
||||
{
|
||||
((OmegaArmour)stack.getItem()).revertArmour(player, stack);
|
||||
hasRevertedArmour = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(hasRevertedArmour)
|
||||
{
|
||||
APISpellHelper.setCurrentAdditionalHP(player, 0);
|
||||
NewPacketHandler.INSTANCE.sendTo(NewPacketHandler.getAddedHPPacket(0, 0), (EntityPlayerMP)player);
|
||||
}
|
||||
}
|
||||
|
||||
if(player instanceof EntityPlayerMP)
|
||||
|
|
|
@ -28,6 +28,7 @@ public class OmegaArmourEarth extends OmegaArmour
|
|||
public OmegaArmourEarth(int armorType)
|
||||
{
|
||||
super(armorType);
|
||||
this.storeYLevel = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -89,10 +90,14 @@ public class OmegaArmourEarth extends OmegaArmour
|
|||
}
|
||||
|
||||
@Override
|
||||
public Multimap getItemAttributeModifiers()
|
||||
public Multimap getAttributeModifiers(ItemStack stack)
|
||||
{
|
||||
Multimap map = HashMultimap.create();
|
||||
map.put(SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(179618 /** Random number **/, armorType), "Armor modifier" + armorType, getKnockbackResist(), 0));
|
||||
int yLevel = this.getYLevelStored(stack);
|
||||
map.put(SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(179618 /** Random number **/, armorType), "Knockback modifier" + armorType, getKnockbackResist(), 0));
|
||||
map.put(SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(80532 /** Random number **/, armorType), "Health modifier" + armorType, getDefaultArmourBoost()*getHealthBoostModifierForLevel(yLevel), 1));
|
||||
map.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(85112 /** Random number **/, armorType), "Damage modifier" + armorType, getDefaultArmourBoost()*getDamageModifierForLevel(yLevel), 2));
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -100,4 +105,30 @@ public class OmegaArmourEarth extends OmegaArmour
|
|||
{
|
||||
return 0.25f;
|
||||
}
|
||||
|
||||
public float getDefaultArmourBoost()
|
||||
{
|
||||
switch(this.armorType)
|
||||
{
|
||||
case 0:
|
||||
return 2.5f;
|
||||
case 1:
|
||||
return 4;
|
||||
case 2:
|
||||
return 3.5f;
|
||||
case 3:
|
||||
return 2;
|
||||
}
|
||||
return 0.25f;
|
||||
}
|
||||
|
||||
public float getHealthBoostModifierForLevel(int yLevel)
|
||||
{
|
||||
return (float) (0.05 * Math.max(-0.5, -((float)yLevel)/64f * 1.5f + 5.5f));
|
||||
}
|
||||
|
||||
public float getDamageModifierForLevel(int yLevel)
|
||||
{
|
||||
return 0.02f * ((((float)yLevel)/64f) * 1.5f - 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,12 +97,13 @@ public class OmegaArmourWater extends OmegaArmour
|
|||
BiomeGenBase biome = BiomeGenBase.getBiome(biomeID);
|
||||
if(biome != null)
|
||||
{
|
||||
map.put(SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(85312 /** Random number **/, armorType), "Armor modifier" + armorType, getDefaultHealthBoost()*getHealthBoostModifierForBiome(biome), 0));
|
||||
map.put(SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(85312 /** Random number **/, armorType), "Health modifier" + armorType, getDefaultArmourBoost()*getHealthBoostModifierForBiome(biome), 2));
|
||||
map.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(85432 /** Random number **/, armorType), "Damage modifier" + armorType, getDefaultArmourBoost()*getDamageModifierForBiome(biome), 2));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
public float getDefaultHealthBoost()
|
||||
public float getDefaultArmourBoost()
|
||||
{
|
||||
switch(this.armorType)
|
||||
{
|
||||
|
@ -120,21 +121,44 @@ public class OmegaArmourWater extends OmegaArmour
|
|||
|
||||
public float getHealthBoostModifierForBiome(BiomeGenBase biome)
|
||||
{
|
||||
float modifier = 0.05f;
|
||||
if(biome.isEqualTo(BiomeGenBase.hell))
|
||||
{
|
||||
return -0.5f;
|
||||
return modifier * -0.5f;
|
||||
}
|
||||
|
||||
if(biome.isEqualTo(BiomeGenBase.ocean))
|
||||
if(biome.isEqualTo(BiomeGenBase.ocean) || biome.isEqualTo(BiomeGenBase.river))
|
||||
{
|
||||
return 2.0f;
|
||||
return modifier * 2.0f;
|
||||
}
|
||||
|
||||
if(biome.isHighHumidity())
|
||||
{
|
||||
return 1.5f;
|
||||
return modifier * 1.5f;
|
||||
}
|
||||
|
||||
return 0.5f;
|
||||
return modifier * 0.5f;
|
||||
}
|
||||
|
||||
public float getDamageModifierForBiome(BiomeGenBase biome)
|
||||
{
|
||||
float modifier = 0.03f;
|
||||
|
||||
if(biome.isEqualTo(BiomeGenBase.hell))
|
||||
{
|
||||
return modifier * -0.5f;
|
||||
}
|
||||
|
||||
if(biome.isEqualTo(BiomeGenBase.ocean) || biome.isEqualTo(BiomeGenBase.river))
|
||||
{
|
||||
return modifier * 2.0f;
|
||||
}
|
||||
|
||||
if(biome.isHighHumidity())
|
||||
{
|
||||
return modifier * 1.5f;
|
||||
}
|
||||
|
||||
return modifier * 0.5f;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ public class OmegaParadigm
|
|||
|
||||
public int getMaxAdditionalHealth()
|
||||
{
|
||||
return 50;
|
||||
return 20;
|
||||
}
|
||||
|
||||
public boolean setOmegaStalling(EntityPlayer player, int duration)
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common.omega;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour;
|
||||
|
||||
|
@ -7,18 +15,52 @@ public class OmegaParadigmEarth extends OmegaParadigm
|
|||
{
|
||||
public OmegaParadigmEarth(OmegaArmour helmet, OmegaArmour chestPiece, OmegaArmour leggings, OmegaArmour boots)
|
||||
{
|
||||
super(ReagentRegistry.terraeReagent, helmet, chestPiece, leggings, boots, new ReagentRegenConfiguration(50, 10, 100));
|
||||
super(ReagentRegistry.terraeReagent, helmet, chestPiece, leggings, boots, new ReagentRegenConfiguration(50, 1, 10));
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public float getCostPerTickOfUse(EntityPlayer player)
|
||||
// {
|
||||
// if(player.isInWater())
|
||||
@Override
|
||||
public float getCostPerTickOfUse(EntityPlayer player)
|
||||
{
|
||||
// if(player.isBurning())
|
||||
// {
|
||||
// return 0.5f;
|
||||
// }else
|
||||
// {
|
||||
// return 1;
|
||||
// }
|
||||
// }
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(World world, EntityPlayer player, ItemStack stack)
|
||||
{
|
||||
if(world.getWorldTime() % 100 == 0 && !world.isRemote)
|
||||
{
|
||||
if(player.posY < 50 && player.getHealth() < player.getMaxHealth())
|
||||
{
|
||||
player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, 0, true));
|
||||
}
|
||||
|
||||
// if(player.isInWater())
|
||||
// {
|
||||
// player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 200, 2, true));
|
||||
// player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 200, 2, true));
|
||||
// player.addPotionEffect(new PotionEffect(Potion.weakness.id, 200, 1, true));
|
||||
// }
|
||||
}
|
||||
|
||||
if(player.posY > 100)
|
||||
{
|
||||
player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, 200, 0, true));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getBlockEffectWhileInside(Entity entity, int x, int y, int z)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOmegaKeyPressed(EntityPlayer player, ItemStack stack)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,12 +14,16 @@ public class OmegaParadigmFire extends OmegaParadigm
|
|||
{
|
||||
public OmegaParadigmFire(OmegaArmour helmet, OmegaArmour chestPiece, OmegaArmour leggings, OmegaArmour boots)
|
||||
{
|
||||
super(ReagentRegistry.incendiumReagent, helmet, chestPiece, leggings, boots, new ReagentRegenConfiguration(50, 10, 100));
|
||||
super(ReagentRegistry.incendiumReagent, helmet, chestPiece, leggings, boots, new ReagentRegenConfiguration(50, 1, 10));
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getCostPerTickOfUse(EntityPlayer player)
|
||||
{
|
||||
if(player.isBurning())
|
||||
{
|
||||
return 0.5f;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ public class OmegaParadigmWater extends OmegaParadigm
|
|||
{
|
||||
public OmegaParadigmWater(OmegaArmour helmet, OmegaArmour chestPiece, OmegaArmour leggings, OmegaArmour boots)
|
||||
{
|
||||
super(ReagentRegistry.aquasalusReagent, helmet, chestPiece, leggings, boots, new ReagentRegenConfiguration(50, 10, 100));
|
||||
super(ReagentRegistry.aquasalusReagent, helmet, chestPiece, leggings, boots, new ReagentRegenConfiguration(50, 1, 10));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -37,6 +37,14 @@ public class OmegaParadigmWater extends OmegaParadigm
|
|||
{
|
||||
player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 3, 0, true));
|
||||
player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionAmphibian.id, 3, 0, true));
|
||||
|
||||
if(world.getWorldTime() % 100 == 0 && !world.isRemote)
|
||||
{
|
||||
if(player.isInWater() && player.getHealth() < player.getMaxHealth())
|
||||
{
|
||||
player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 200, 0, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package WayofTime.alchemicalWizardry.common.rituals;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
|
||||
|
@ -19,6 +20,8 @@ public class RitualEffectWellOfSuffering extends RitualEffect
|
|||
{
|
||||
public static final int timeDelay = 25;
|
||||
public static final int amount = 10;
|
||||
|
||||
private static final int tennebraeDrain = 5;
|
||||
|
||||
@Override
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
|
@ -65,6 +68,7 @@ public class RitualEffectWellOfSuffering extends RitualEffect
|
|||
List<EntityLivingBase> list = world.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb);
|
||||
|
||||
int entityCount = 0;
|
||||
boolean hasTennebrae = this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tennebraeDrain, false);
|
||||
|
||||
if (currentEssence < this.getCostPerRefresh() * list.size())
|
||||
{
|
||||
|
@ -80,8 +84,10 @@ public class RitualEffectWellOfSuffering extends RitualEffect
|
|||
|
||||
if (livingEntity.attackEntityFrom(DamageSource.outOfWorld, 1))
|
||||
{
|
||||
hasTennebrae = hasTennebrae && this.canDrainReagent(ritualStone, ReagentRegistry.tenebraeReagent, tennebraeDrain, true);
|
||||
|
||||
entityCount++;
|
||||
tileAltar.sacrificialDaggerCall(this.amount, true);
|
||||
tileAltar.sacrificialDaggerCall(this.amount * (hasTennebrae ? 2 : 1), true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -547,13 +547,13 @@ public class SpellHelper
|
|||
int[] array = ((ISidedInventory)inventory).getAccessibleSlotsFromSide(dir.ordinal());
|
||||
for(int in : array)
|
||||
{
|
||||
canBeInserted[in] = ((ISidedInventory)inventory).canInsertItem(in, stack, dir.ordinal());
|
||||
canBeInserted[in] = inventory.isItemValidForSlot(in, stack) && ((ISidedInventory)inventory).canInsertItem(in, stack, dir.ordinal());
|
||||
}
|
||||
}else
|
||||
{
|
||||
for(int i=0; i<canBeInserted.length; i++)
|
||||
{
|
||||
canBeInserted[i] = true;
|
||||
canBeInserted[i] = inventory.isItemValidForSlot(i, stack);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue