Anti-comments sweep!
This commit is contained in:
parent
e6a10f3f06
commit
dea1f87078
454 changed files with 23594 additions and 26739 deletions
|
@ -1,18 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
|
@ -20,17 +15,12 @@ import net.minecraft.entity.passive.EntityHorse;
|
|||
import net.minecraft.entity.passive.EntityWolf;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.pathfinding.PathEntity;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class EntityBileDemon extends EntityDemon
|
||||
{
|
||||
|
@ -46,22 +36,17 @@ public class EntityBileDemon extends EntityDemon
|
|||
this.setSize(1.3F, 2.0F);
|
||||
this.getNavigator().setAvoidsWater(true);
|
||||
this.tasks.addTask(1, new EntityAISwimming(this));
|
||||
//this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
|
||||
this.tasks.addTask(2, new EntityAIAttackOnCollide(this, 1.0D, true));
|
||||
this.tasks.addTask(3, this.aiSit);
|
||||
this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
//this.tasks.addTask(6, new EntityAIMate(this, 1.0D));
|
||||
this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
|
||||
//this.tasks.addTask(8, new EntityAIBeg(this, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAILookIdle(this));
|
||||
this.tasks.addTask(4, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
|
||||
this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(7, new EntityAILookIdle(this));
|
||||
this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
|
||||
this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
|
||||
this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true));
|
||||
//this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false));
|
||||
this.setTamed(false);
|
||||
attackTimer = 0;
|
||||
//this.isImmuneToFire = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -318,7 +303,7 @@ public class EntityBileDemon extends EntityDemon
|
|||
}
|
||||
}
|
||||
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer)this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
|
@ -375,7 +360,6 @@ public class EntityBileDemon extends EntityDemon
|
|||
public boolean isBreedingItem(ItemStack par1ItemStack)
|
||||
{
|
||||
return false;
|
||||
//return par1ItemStack == null ? false : (!(Item.itemsList[par1ItemStack.itemID] instanceof ItemFood) ? false : ((ItemFood)Item.itemsList[par1ItemStack.itemID]).isWolfsFavoriteMeat());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -455,7 +439,6 @@ public class EntityBileDemon extends EntityDemon
|
|||
*/
|
||||
protected boolean canDespawn()
|
||||
{
|
||||
//return !this.isTamed() && this.ticksExisted > 2400;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import WayofTime.alchemicalWizardry.ModItems;
|
|||
import WayofTime.alchemicalWizardry.common.EntityAITargetAggro;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.block.BlockColored;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -18,7 +17,6 @@ import net.minecraft.entity.passive.EntityHorse;
|
|||
import net.minecraft.entity.passive.EntityWolf;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -28,7 +26,6 @@ import net.minecraft.world.World;
|
|||
|
||||
public class EntityBoulderFist extends EntityDemon
|
||||
{
|
||||
//private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 40, 40, 15.0F);
|
||||
private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false);
|
||||
|
||||
private static float maxTamedHealth = 60.0F;
|
||||
|
@ -44,25 +41,20 @@ public class EntityBoulderFist extends EntityDemon
|
|||
this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
|
||||
this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true));
|
||||
this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
//this.tasks.addTask(6, new EntityAIMate(this, 1.0D));
|
||||
this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
|
||||
//this.tasks.addTask(8, new EntityAIBeg(this, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAILookIdle(this));
|
||||
this.tasks.addTask(6, new EntityAIWander(this, 1.0D));
|
||||
this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(8, new EntityAILookIdle(this));
|
||||
this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
|
||||
this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
|
||||
this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true));
|
||||
this.targetTasks.addTask(4, new EntityAITargetAggro(this, EntityPlayer.class, 0, false));
|
||||
this.setAggro(false);
|
||||
//this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false));
|
||||
this.setTamed(false);
|
||||
|
||||
if (par1World != null && !par1World.isRemote)
|
||||
{
|
||||
this.setCombatTask();
|
||||
}
|
||||
|
||||
//this.isImmuneToFire = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -80,8 +72,6 @@ public class EntityBoulderFist extends EntityDemon
|
|||
{
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.maxUntamedHealth);
|
||||
}
|
||||
|
||||
//this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(10.0D);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -121,7 +111,6 @@ public class EntityBoulderFist extends EntityDemon
|
|||
super.entityInit();
|
||||
this.dataWatcher.addObject(18, new Float(this.getHealth()));
|
||||
this.dataWatcher.addObject(19, new Byte((byte) 0));
|
||||
//this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -300,7 +289,7 @@ public class EntityBoulderFist extends EntityDemon
|
|||
}
|
||||
}
|
||||
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer)this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
|
@ -358,7 +347,6 @@ public class EntityBoulderFist extends EntityDemon
|
|||
public boolean isBreedingItem(ItemStack par1ItemStack)
|
||||
{
|
||||
return false;
|
||||
//return par1ItemStack == null ? false : (!(Item.itemsList[par1ItemStack.itemID] instanceof ItemFood) ? false : ((ItemFood)Item.itemsList[par1ItemStack.itemID]).isWolfsFavoriteMeat());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -438,7 +426,6 @@ public class EntityBoulderFist extends EntityDemon
|
|||
*/
|
||||
protected boolean canDespawn()
|
||||
{
|
||||
//return !this.isTamed() && this.ticksExisted > 2400;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.IDemon;
|
||||
import WayofTime.alchemicalWizardry.common.items.DemonPlacer;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.passive.EntityTameable;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.IDemon;
|
||||
import WayofTime.alchemicalWizardry.common.items.DemonPlacer;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class EntityDemon extends EntityTameable implements IDemon
|
||||
{
|
||||
|
@ -51,11 +51,11 @@ public class EntityDemon extends EntityTameable implements IDemon
|
|||
{
|
||||
ItemStack drop = new ItemStack(ModItems.demonPlacer, 1, this.getDemonID());
|
||||
|
||||
if((this.getOwner() instanceof EntityPlayer))
|
||||
{
|
||||
DemonPlacer.setOwnerName(drop, SpellHelper.getUsername((EntityPlayer)this.getOwner()));
|
||||
}
|
||||
|
||||
if ((this.getOwner() instanceof EntityPlayer))
|
||||
{
|
||||
DemonPlacer.setOwnerName(drop, SpellHelper.getUsername((EntityPlayer) this.getOwner()));
|
||||
}
|
||||
|
||||
if (this.hasCustomNameTag())
|
||||
{
|
||||
drop.setStackDisplayName(this.getCustomNameTag());
|
||||
|
|
|
@ -5,9 +5,7 @@ import WayofTime.alchemicalWizardry.ModItems;
|
|||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockColored;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
|
@ -15,7 +13,6 @@ import net.minecraft.entity.monster.EntityCreeper;
|
|||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
import net.minecraft.entity.passive.EntityWolf;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -30,7 +27,6 @@ import java.util.List;
|
|||
|
||||
public class EntityElemental extends EntityDemon
|
||||
{
|
||||
//private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 40, 40, 15.0F);
|
||||
private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false);
|
||||
|
||||
private static float maxTamedHealth = 100.0F;
|
||||
|
@ -41,15 +37,12 @@ public class EntityElemental extends EntityDemon
|
|||
super(par1World, demonID);
|
||||
this.setSize(0.5F, 1.0F);
|
||||
this.setAggro(false);
|
||||
//this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false));
|
||||
this.setTamed(false);
|
||||
|
||||
if (par1World != null && !par1World.isRemote)
|
||||
{
|
||||
this.setCombatTask();
|
||||
}
|
||||
|
||||
//this.isImmuneToFire = true;
|
||||
}
|
||||
|
||||
public int courseChangeCooldown;
|
||||
|
@ -68,11 +61,6 @@ public class EntityElemental extends EntityDemon
|
|||
/**
|
||||
* The explosion radius of spawned fireballs.
|
||||
*/
|
||||
//private int explosionStrength = 1;
|
||||
//
|
||||
// private int heightOffsetUpdateTime;
|
||||
// private float heightOffset = 0.5F;
|
||||
// private int field_70846_g;
|
||||
protected void dropFewItems(boolean par1, int par2)
|
||||
{
|
||||
if (worldObj.rand.nextFloat() < (1 - Math.pow(0.6f, par2 + 1)))
|
||||
|
@ -174,12 +162,6 @@ public class EntityElemental extends EntityDemon
|
|||
|
||||
protected void updateEntityActionState()
|
||||
{
|
||||
// if (!this.worldObj.isRemote && this.worldObj.difficultySetting == 0)
|
||||
// {
|
||||
// this.setDead();
|
||||
// }
|
||||
|
||||
//this.despawnEntity();
|
||||
if (this.getHealth() <= this.getMaxHealth() / 2.0f && worldObj.rand.nextInt(200) == 0)
|
||||
{
|
||||
this.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionReciprocation.id, 100, 1));
|
||||
|
@ -265,10 +247,6 @@ public class EntityElemental extends EntityDemon
|
|||
{
|
||||
if (Math.sqrt(d5 * d5 + d6 * d6 + d7 * d7) < 4)
|
||||
{
|
||||
// if (this.attackCounter == 10)
|
||||
// {
|
||||
// this.worldObj.playAuxSFXAtEntity((EntityPlayer)null, 1007, (int)this.posX, (int)this.posY, (int)this.posZ, 0);
|
||||
// }
|
||||
++this.attackCounter;
|
||||
|
||||
if (this.attackCounter >= 10)
|
||||
|
@ -369,8 +347,6 @@ public class EntityElemental extends EntityDemon
|
|||
{
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.maxUntamedHealth);
|
||||
}
|
||||
|
||||
//this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(10.0D);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -410,7 +386,6 @@ public class EntityElemental extends EntityDemon
|
|||
super.entityInit();
|
||||
this.dataWatcher.addObject(18, new Float(this.getHealth()));
|
||||
this.dataWatcher.addObject(19, new Byte((byte) 0));
|
||||
//this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1)));
|
||||
this.dataWatcher.addObject(25, Byte.valueOf((byte) 0));
|
||||
}
|
||||
|
||||
|
@ -546,7 +521,6 @@ public class EntityElemental extends EntityDemon
|
|||
public boolean isBreedingItem(ItemStack par1ItemStack)
|
||||
{
|
||||
return false;
|
||||
//return par1ItemStack == null ? false : (!(Item.itemsList[par1ItemStack.itemID] instanceof ItemFood) ? false : ((ItemFood)Item.itemsList[par1ItemStack.itemID]).isWolfsFavoriteMeat());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -602,7 +576,6 @@ public class EntityElemental extends EntityDemon
|
|||
*/
|
||||
protected boolean canDespawn()
|
||||
{
|
||||
//return !this.isTamed() && this.ticksExisted > 2400;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -622,7 +595,6 @@ public class EntityElemental extends EntityDemon
|
|||
}
|
||||
|
||||
return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer) par2EntityLivingBase).canAttackPlayer((EntityPlayer) par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse) par1EntityLivingBase).isTame();
|
||||
//return par1EntityLivingBase instanceof EntityPlayer && par2EntityLivingBase instanceof EntityPlayer && !((EntityPlayer)par2EntityLivingBase).func_96122_a((EntityPlayer)par1EntityLivingBase) ? false : !(par1EntityLivingBase instanceof EntityHorse) || !((EntityHorse)par1EntityLivingBase).func_110248_bS();
|
||||
} else
|
||||
{
|
||||
return false;
|
||||
|
@ -636,7 +608,6 @@ public class EntityElemental extends EntityDemon
|
|||
public void setCombatTask()
|
||||
{
|
||||
this.tasks.removeTask(this.aiAttackOnCollide);
|
||||
//this.tasks.removeTask(this.aiArrowAttack);
|
||||
ItemStack itemstack = this.getHeldItem();
|
||||
this.tasks.addTask(4, this.aiAttackOnCollide);
|
||||
}
|
||||
|
@ -708,7 +679,7 @@ public class EntityElemental extends EntityDemon
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getTotalArmorValue() //TODO
|
||||
public int getTotalArmorValue()
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
|
|
|
@ -1,21 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
|
||||
import net.minecraft.block.BlockColored;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IRangedAttackMob;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAIArrowAttack;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.EntityAITargetAggro;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.*;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
|
@ -29,11 +20,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.pathfinding.PathEntity;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.EntityAITargetAggro;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob
|
||||
{
|
||||
|
@ -50,20 +36,15 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob
|
|||
this.getNavigator().setAvoidsWater(true);
|
||||
this.tasks.addTask(1, new EntityAISwimming(this));
|
||||
this.tasks.addTask(2, this.aiSit);
|
||||
//this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
|
||||
//this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true));
|
||||
this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
//this.tasks.addTask(6, new EntityAIMate(this, 1.0D));
|
||||
this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
|
||||
//this.tasks.addTask(8, new EntityAIBeg(this, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAILookIdle(this));
|
||||
this.tasks.addTask(3, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
this.tasks.addTask(4, new EntityAIWander(this, 1.0D));
|
||||
this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(6, new EntityAILookIdle(this));
|
||||
this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
|
||||
this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
|
||||
this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true));
|
||||
this.targetTasks.addTask(4, new EntityAITargetAggro(this, EntityPlayer.class, 0, false));
|
||||
this.setAggro(false);
|
||||
//this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false));
|
||||
this.setTamed(false);
|
||||
|
||||
if (par1World != null && !par1World.isRemote)
|
||||
|
@ -89,8 +70,6 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob
|
|||
{
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.maxUntamedHealth);
|
||||
}
|
||||
|
||||
//this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(10.0D);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -130,7 +109,6 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob
|
|||
super.entityInit();
|
||||
this.dataWatcher.addObject(18, new Float(this.getHealth()));
|
||||
this.dataWatcher.addObject(19, new Byte((byte) 0));
|
||||
//this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -309,7 +287,7 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob
|
|||
}
|
||||
}
|
||||
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer)this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
|
|
|
@ -1,21 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
|
||||
import net.minecraft.block.BlockColored;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IRangedAttackMob;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAIArrowAttack;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.EntityAITargetAggro;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.*;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
|
@ -30,11 +21,6 @@ import net.minecraft.pathfinding.PathEntity;
|
|||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.EntityAITargetAggro;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class EntityIceDemon extends EntityDemon implements IRangedAttackMob
|
||||
{
|
||||
|
@ -48,31 +34,23 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob
|
|||
{
|
||||
super(par1World, AlchemicalWizardry.entityIceDemonID);
|
||||
this.setSize(0.5F, 2.0F);
|
||||
//this.getNavigator().setAvoidsWater(true);
|
||||
this.tasks.addTask(1, new EntityAISwimming(this));
|
||||
this.tasks.addTask(2, this.aiSit);
|
||||
//this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
|
||||
//this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true));
|
||||
this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
//this.tasks.addTask(6, new EntityAIMate(this, 1.0D));
|
||||
this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
|
||||
//this.tasks.addTask(8, new EntityAIBeg(this, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAILookIdle(this));
|
||||
this.tasks.addTask(3, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
this.tasks.addTask(4, new EntityAIWander(this, 1.0D));
|
||||
this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(6, new EntityAILookIdle(this));
|
||||
this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
|
||||
this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
|
||||
this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true));
|
||||
this.targetTasks.addTask(4, new EntityAITargetAggro(this, EntityPlayer.class, 0, false));
|
||||
this.setAggro(false);
|
||||
//this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false));
|
||||
this.setTamed(false);
|
||||
|
||||
if (par1World != null && !par1World.isRemote)
|
||||
{
|
||||
this.setCombatTask();
|
||||
}
|
||||
|
||||
//this.isImmuneToFire = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -90,8 +68,6 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob
|
|||
{
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.maxUntamedHealth);
|
||||
}
|
||||
|
||||
//this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(10.0D);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -131,7 +107,6 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob
|
|||
super.entityInit();
|
||||
this.dataWatcher.addObject(18, new Float(this.getHealth()));
|
||||
this.dataWatcher.addObject(19, new Byte((byte) 0));
|
||||
//this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -210,12 +185,12 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob
|
|||
{
|
||||
super.onLivingUpdate();
|
||||
int range = 2;
|
||||
|
||||
|
||||
Vec3 blockVector = SpellHelper.getEntityBlockVector(this);
|
||||
|
||||
int xCoord = (int)(blockVector.xCoord);
|
||||
int yCoord = (int)(blockVector.yCoord);
|
||||
int zCoord = (int)(blockVector.zCoord);
|
||||
|
||||
int xCoord = (int) (blockVector.xCoord);
|
||||
int yCoord = (int) (blockVector.yCoord);
|
||||
int zCoord = (int) (blockVector.zCoord);
|
||||
|
||||
for (int i = -range; i <= range; i++)
|
||||
{
|
||||
|
@ -330,7 +305,7 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob
|
|||
}
|
||||
}
|
||||
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer)this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
|
@ -388,7 +363,6 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob
|
|||
public boolean isBreedingItem(ItemStack par1ItemStack)
|
||||
{
|
||||
return false;
|
||||
//return par1ItemStack == null ? false : (!(Item.itemsList[par1ItemStack.itemID] instanceof ItemFood) ? false : ((ItemFood)Item.itemsList[par1ItemStack.itemID]).isWolfsFavoriteMeat());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -468,7 +442,6 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob
|
|||
*/
|
||||
protected boolean canDespawn()
|
||||
{
|
||||
//return !this.isTamed() && this.ticksExisted > 2400;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
|||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.EntityAITargetAggro;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.block.BlockColored;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -17,7 +16,6 @@ import net.minecraft.entity.passive.EntityHorse;
|
|||
import net.minecraft.entity.passive.EntityWolf;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -40,15 +38,12 @@ public class EntityLowerGuardian extends EntityDemon
|
|||
this.setSize(0.7F, 1.8F);
|
||||
this.getNavigator().setAvoidsWater(true);
|
||||
this.tasks.addTask(1, new EntityAISwimming(this));
|
||||
//this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
|
||||
this.tasks.addTask(2, new EntityAIAttackOnCollide(this, 1.0D, true));
|
||||
this.tasks.addTask(3, this.aiSit);
|
||||
this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
//this.tasks.addTask(6, new EntityAIMate(this, 1.0D));
|
||||
this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
|
||||
//this.tasks.addTask(8, new EntityAIBeg(this, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAILookIdle(this));
|
||||
this.tasks.addTask(4, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
|
||||
this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(7, new EntityAILookIdle(this));
|
||||
this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
|
||||
this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
|
||||
this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true));
|
||||
|
@ -56,8 +51,6 @@ public class EntityLowerGuardian extends EntityDemon
|
|||
this.setAggro(false);
|
||||
this.setTamed(false);
|
||||
attackTimer = 0;
|
||||
//isAggro = false;
|
||||
//this.isImmuneToFire = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -75,8 +68,6 @@ public class EntityLowerGuardian extends EntityDemon
|
|||
{
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.maxUntamedHealth);
|
||||
}
|
||||
|
||||
//this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(10.0D);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -116,7 +107,6 @@ public class EntityLowerGuardian extends EntityDemon
|
|||
super.entityInit();
|
||||
this.dataWatcher.addObject(18, new Float(this.getHealth()));
|
||||
this.dataWatcher.addObject(19, new Byte((byte) 0));
|
||||
//this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -316,7 +306,7 @@ public class EntityLowerGuardian extends EntityDemon
|
|||
}
|
||||
}
|
||||
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer)this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
|
@ -374,7 +364,6 @@ public class EntityLowerGuardian extends EntityDemon
|
|||
public boolean isBreedingItem(ItemStack par1ItemStack)
|
||||
{
|
||||
return false;
|
||||
//return par1ItemStack == null ? false : (!(Item.itemsList[par1ItemStack.itemID] instanceof ItemFood) ? false : ((ItemFood)Item.itemsList[par1ItemStack.itemID]).isWolfsFavoriteMeat());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -454,7 +443,6 @@ public class EntityLowerGuardian extends EntityDemon
|
|||
*/
|
||||
protected boolean canDespawn()
|
||||
{
|
||||
//return !this.isTamed() && this.ticksExisted > 2400;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import WayofTime.alchemicalWizardry.ModItems;
|
|||
import WayofTime.alchemicalWizardry.common.EntityAITargetAggro;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.block.BlockColored;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -18,7 +17,6 @@ import net.minecraft.entity.passive.EntityHorse;
|
|||
import net.minecraft.entity.passive.EntityWolf;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -28,7 +26,6 @@ import net.minecraft.world.World;
|
|||
|
||||
public class EntityShade extends EntityDemon
|
||||
{
|
||||
//private EntityAIArrowAttack aiArrowAttack = new EntityAIArrowAttack(this, 1.0D, 40, 40, 15.0F);
|
||||
private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false);
|
||||
|
||||
private static float maxTamedHealth = 50.0F;
|
||||
|
@ -41,28 +38,22 @@ public class EntityShade extends EntityDemon
|
|||
this.getNavigator().setAvoidsWater(true);
|
||||
this.tasks.addTask(1, new EntityAISwimming(this));
|
||||
this.tasks.addTask(2, this.aiSit);
|
||||
//this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
|
||||
this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true));
|
||||
this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
//this.tasks.addTask(6, new EntityAIMate(this, 1.0D));
|
||||
this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
|
||||
//this.tasks.addTask(8, new EntityAIBeg(this, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAILookIdle(this));
|
||||
this.tasks.addTask(3, new EntityAIAttackOnCollide(this, 1.0D, true));
|
||||
this.tasks.addTask(4, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
this.tasks.addTask(5, new EntityAIWander(this, 1.0D));
|
||||
this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(7, new EntityAILookIdle(this));
|
||||
this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
|
||||
this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
|
||||
this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true));
|
||||
this.targetTasks.addTask(4, new EntityAITargetAggro(this, EntityPlayer.class, 0, false));
|
||||
this.setAggro(false);
|
||||
//this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false));
|
||||
this.setTamed(false);
|
||||
|
||||
if (par1World != null && !par1World.isRemote)
|
||||
{
|
||||
this.setCombatTask();
|
||||
}
|
||||
|
||||
//this.isImmuneToFire = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -80,8 +71,6 @@ public class EntityShade extends EntityDemon
|
|||
{
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.maxUntamedHealth);
|
||||
}
|
||||
|
||||
//this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(10.0D);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -121,7 +110,6 @@ public class EntityShade extends EntityDemon
|
|||
super.entityInit();
|
||||
this.dataWatcher.addObject(18, new Float(this.getHealth()));
|
||||
this.dataWatcher.addObject(19, new Byte((byte) 0));
|
||||
//this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -300,7 +288,7 @@ public class EntityShade extends EntityDemon
|
|||
}
|
||||
}
|
||||
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer)this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
|
@ -358,7 +346,6 @@ public class EntityShade extends EntityDemon
|
|||
public boolean isBreedingItem(ItemStack par1ItemStack)
|
||||
{
|
||||
return false;
|
||||
//return par1ItemStack == null ? false : (!(Item.itemsList[par1ItemStack.itemID] instanceof ItemFood) ? false : ((ItemFood)Item.itemsList[par1ItemStack.itemID]).isWolfsFavoriteMeat());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -438,7 +425,6 @@ public class EntityShade extends EntityDemon
|
|||
*/
|
||||
protected boolean canDespawn()
|
||||
{
|
||||
//return !this.isTamed() && this.ticksExisted > 2400;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,20 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IRangedAttackMob;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAIArrowAttack;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.EntityAITargetAggro;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.*;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
|
@ -28,11 +20,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.pathfinding.PathEntity;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.EntityAITargetAggro;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackMob
|
||||
{
|
||||
|
@ -49,28 +36,21 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM
|
|||
this.getNavigator().setAvoidsWater(true);
|
||||
this.tasks.addTask(1, new EntityAISwimming(this));
|
||||
this.tasks.addTask(2, this.aiSit);
|
||||
//this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
|
||||
//this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true));
|
||||
this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
//this.tasks.addTask(6, new EntityAIMate(this, 1.0D));
|
||||
this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
|
||||
//this.tasks.addTask(8, new EntityAIBeg(this, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAILookIdle(this));
|
||||
this.tasks.addTask(3, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
this.tasks.addTask(4, new EntityAIWander(this, 1.0D));
|
||||
this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(5, new EntityAILookIdle(this));
|
||||
this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
|
||||
this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
|
||||
this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true));
|
||||
this.targetTasks.addTask(4, new EntityAITargetAggro(this, EntityPlayer.class, 0, false));
|
||||
this.setAggro(false);
|
||||
//this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false));
|
||||
this.setTamed(false);
|
||||
|
||||
if (par1World != null && !par1World.isRemote)
|
||||
{
|
||||
this.setCombatTask();
|
||||
}
|
||||
|
||||
//this.isImmuneToFire = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -88,8 +68,6 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM
|
|||
{
|
||||
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(this.maxUntamedHealth);
|
||||
}
|
||||
|
||||
//this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(10.0D);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -129,7 +107,6 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM
|
|||
super.entityInit();
|
||||
this.dataWatcher.addObject(18, new Float(this.getHealth()));
|
||||
this.dataWatcher.addObject(19, new Byte((byte) 0));
|
||||
//this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -307,7 +284,7 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM
|
|||
}
|
||||
}
|
||||
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer)this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
|
@ -365,7 +342,6 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM
|
|||
public boolean isBreedingItem(ItemStack par1ItemStack)
|
||||
{
|
||||
return false;
|
||||
//return par1ItemStack == null ? false : (!(Item.itemsList[par1ItemStack.itemID] instanceof ItemFood) ? false : ((ItemFood)Item.itemsList[par1ItemStack.itemID]).isWolfsFavoriteMeat());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -445,7 +421,6 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM
|
|||
*/
|
||||
protected boolean canDespawn()
|
||||
{
|
||||
//return !this.isTamed() && this.ticksExisted > 2400;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,21 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.mob;
|
||||
|
||||
import net.minecraft.block.BlockColored;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IRangedAttackMob;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAIArrowAttack;
|
||||
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
|
||||
import net.minecraft.entity.ai.EntityAIFollowOwner;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import net.minecraft.entity.ai.EntityAISwimming;
|
||||
import net.minecraft.entity.ai.EntityAIWander;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.EntityAITargetAggro;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.*;
|
||||
import net.minecraft.entity.ai.*;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityGhast;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
|
@ -23,18 +14,12 @@ import net.minecraft.entity.passive.EntityHorse;
|
|||
import net.minecraft.entity.passive.EntityWolf;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.pathfinding.PathEntity;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.EntityAITargetAggro;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackMob
|
||||
{
|
||||
|
@ -51,20 +36,15 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM
|
|||
this.getNavigator().setAvoidsWater(true);
|
||||
this.tasks.addTask(1, new EntityAISwimming(this));
|
||||
this.tasks.addTask(2, this.aiSit);
|
||||
//this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
|
||||
//this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true));
|
||||
this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
//this.tasks.addTask(6, new EntityAIMate(this, 1.0D));
|
||||
this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
|
||||
//this.tasks.addTask(8, new EntityAIBeg(this, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(9, new EntityAILookIdle(this));
|
||||
this.tasks.addTask(3, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
|
||||
this.tasks.addTask(4, new EntityAIWander(this, 1.0D));
|
||||
this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
|
||||
this.tasks.addTask(6, new EntityAILookIdle(this));
|
||||
this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
|
||||
this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
|
||||
this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true));
|
||||
this.targetTasks.addTask(4, new EntityAITargetAggro(this, EntityPlayer.class, 0, false));
|
||||
this.setAggro(false);
|
||||
//this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false));
|
||||
this.setTamed(false);
|
||||
|
||||
if (par1World != null && !par1World.isRemote)
|
||||
|
@ -131,7 +111,6 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM
|
|||
super.entityInit();
|
||||
this.dataWatcher.addObject(18, new Float(this.getHealth()));
|
||||
this.dataWatcher.addObject(19, new Byte((byte) 0));
|
||||
//this.dataWatcher.addObject(20, new Byte((byte) BlockColored.getBlockFromDye(1)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -309,7 +288,7 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM
|
|||
}
|
||||
}
|
||||
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer)this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
if (this.getOwner() instanceof EntityPlayer && SpellHelper.getUsername(par1EntityPlayer).equalsIgnoreCase(SpellHelper.getUsername((EntityPlayer) this.getOwner())) && !this.isBreedingItem(itemstack))
|
||||
{
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
|
@ -367,7 +346,6 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM
|
|||
public boolean isBreedingItem(ItemStack par1ItemStack)
|
||||
{
|
||||
return false;
|
||||
//return par1ItemStack == null ? false : (!(Item.itemsList[par1ItemStack.itemID] instanceof ItemFood) ? false : ((ItemFood)Item.itemsList[par1ItemStack.itemID]).isWolfsFavoriteMeat());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -447,7 +425,6 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM
|
|||
*/
|
||||
protected boolean canDespawn()
|
||||
{
|
||||
//return !this.isTamed() && this.ticksExisted > 2400;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.projectile;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.registry.IThrowableEntity;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -11,15 +11,11 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.registry.IThrowableEntity;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
//Shamelessly ripped off from x3n0ph0b3
|
||||
public class EnergyBlastProjectile extends Entity implements IProjectile, IThrowableEntity
|
||||
|
@ -252,8 +248,6 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow
|
|||
|
||||
if (var18.equals(Block.getBlockById(inTile)) && var19 == inData)
|
||||
{
|
||||
// this.groundImpact();
|
||||
// this.setDead();
|
||||
}
|
||||
} else
|
||||
{
|
||||
|
@ -261,7 +255,6 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow
|
|||
|
||||
if (ticksInAir > 1 && ticksInAir < 3)
|
||||
{
|
||||
//worldObj.spawnParticle("flame", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0D, 0D, 0D);
|
||||
for (int particles = 0; particles < 3; particles++)
|
||||
{
|
||||
this.doFiringParticles();
|
||||
|
@ -328,7 +321,6 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow
|
|||
posZ += motionZ;
|
||||
MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ);
|
||||
this.setPosition(posX, posY, posZ);
|
||||
//this.doBlockCollisions();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -457,12 +449,10 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow
|
|||
this.setDead();
|
||||
} else
|
||||
{
|
||||
//doDamage(8 + d6(), mop);
|
||||
if (mop instanceof EntityLivingBase)
|
||||
{
|
||||
((EntityLivingBase) mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60, 2));
|
||||
}
|
||||
|
||||
doDamage(projectileDamage, mop);
|
||||
worldObj.createExplosion(shootingEntity, this.posX, this.posY, this.posZ, (float) (0.1), true);
|
||||
}
|
||||
|
@ -509,18 +499,18 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow
|
|||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Entity getThrower()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return this.shootingEntity;
|
||||
}
|
||||
@Override
|
||||
public Entity getThrower()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return this.shootingEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setThrower(Entity entity)
|
||||
{
|
||||
if(entity instanceof EntityLivingBase)
|
||||
this.shootingEntity = (EntityLivingBase)entity;
|
||||
|
||||
}
|
||||
@Override
|
||||
public void setThrower(Entity entity)
|
||||
{
|
||||
if (entity instanceof EntityLivingBase)
|
||||
this.shootingEntity = (EntityLivingBase) entity;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,11 +6,11 @@ import net.minecraft.world.World;
|
|||
public class EntityBeamParticle extends EntityFX
|
||||
{
|
||||
|
||||
protected EntityBeamParticle(World p_i1218_1_, double p_i1218_2_,
|
||||
double p_i1218_4_, double p_i1218_6_)
|
||||
{
|
||||
super(p_i1218_1_, p_i1218_2_, p_i1218_4_, p_i1218_6_);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
protected EntityBeamParticle(World p_i1218_1_, double p_i1218_2_,
|
||||
double p_i1218_4_, double p_i1218_6_)
|
||||
{
|
||||
super(p_i1218_1_, p_i1218_2_, p_i1218_4_, p_i1218_6_);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.projectile;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
|
||||
|
||||
public class EntityBloodLightProjectile extends EnergyBlastProjectile
|
||||
|
@ -90,8 +89,6 @@ public class EntityBloodLightProjectile extends EnergyBlastProjectile
|
|||
{
|
||||
this.worldObj.setBlock(blockX + 1, blockY, blockZ, ModBlocks.blockBloodLight);
|
||||
}
|
||||
|
||||
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
|
||||
}
|
||||
|
||||
this.setDead();
|
||||
|
@ -106,18 +103,11 @@ public class EntityBloodLightProjectile extends EnergyBlastProjectile
|
|||
this.setDead();
|
||||
} else
|
||||
{
|
||||
//doDamage(8 + d6(), mop);
|
||||
if (mop instanceof EntityLivingBase)
|
||||
{
|
||||
//((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2));
|
||||
|
||||
((EntityLivingBase) mop).setRevengeTarget(shootingEntity);
|
||||
|
||||
doDamage(1, mop);
|
||||
|
||||
}
|
||||
|
||||
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
|
||||
}
|
||||
|
||||
if (worldObj.isAirBlock((int) this.posX, (int) this.posY, (int) this.posZ))
|
||||
|
|
|
@ -68,7 +68,6 @@ public class EntityEnergyBazookaMainProjectile extends EnergyBlastProjectile
|
|||
this.setDead();
|
||||
} else
|
||||
{
|
||||
//doDamage(8 + d6(), mop);
|
||||
if (mop instanceof EntityLivingBase)
|
||||
{
|
||||
spawnSecondaryProjectiles();
|
||||
|
|
|
@ -195,8 +195,6 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil
|
|||
|
||||
if (var18.equals(Block.getBlockById(inTile)) && var19 == inData)
|
||||
{
|
||||
// this.groundImpact();
|
||||
// this.setDead();
|
||||
}
|
||||
} else
|
||||
{
|
||||
|
@ -204,7 +202,6 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil
|
|||
|
||||
if (ticksInAir > 1 && ticksInAir < 3)
|
||||
{
|
||||
//worldObj.spawnParticle("flame", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0D, 0D, 0D);
|
||||
for (int particles = 0; particles < 3; particles++)
|
||||
{
|
||||
this.doFiringParticles();
|
||||
|
@ -271,7 +268,6 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil
|
|||
posZ += motionZ;
|
||||
MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ);
|
||||
this.setPosition(posX, posY, posZ);
|
||||
//this.doBlockCollisions();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.projectile;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry;
|
||||
|
||||
public class EntityMeteor extends EnergyBlastProjectile
|
||||
{
|
||||
private int meteorID;
|
||||
|
||||
|
||||
public boolean hasTerrae;
|
||||
public boolean hasOrbisTerrae;
|
||||
public boolean hasCrystallos;
|
||||
|
@ -28,12 +28,12 @@ public class EntityMeteor extends EnergyBlastProjectile
|
|||
super(par1World, par2, par4, par6);
|
||||
this.meteorID = meteorID;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
|
||||
{
|
||||
super.writeEntityToNBT(par1NBTTagCompound);
|
||||
|
||||
|
||||
par1NBTTagCompound.setInteger("meteorID", meteorID);
|
||||
par1NBTTagCompound.setBoolean("hasTerrae", hasTerrae);
|
||||
par1NBTTagCompound.setBoolean("hasOrbisTerrae", hasOrbisTerrae);
|
||||
|
@ -46,7 +46,7 @@ public class EntityMeteor extends EnergyBlastProjectile
|
|||
public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
|
||||
{
|
||||
super.readEntityFromNBT(par1NBTTagCompound);
|
||||
|
||||
|
||||
meteorID = par1NBTTagCompound.getInteger("meteorID");
|
||||
hasTerrae = par1NBTTagCompound.getBoolean("hasTerrae");
|
||||
hasOrbisTerrae = par1NBTTagCompound.getBoolean("hasOrbisTerrae");
|
||||
|
@ -83,7 +83,7 @@ public class EntityMeteor extends EnergyBlastProjectile
|
|||
@Override
|
||||
public void onImpact(Entity mop)
|
||||
{
|
||||
MeteorRegistry.createMeteorImpact(worldObj, (int) this.posX, (int) this.posY, (int) this.posZ, meteorID, new boolean[]{hasTerrae, hasOrbisTerrae, hasCrystallos, hasIncendium, hasTennebrae});
|
||||
MeteorRegistry.createMeteorImpact(worldObj, (int) this.posX, (int) this.posY, (int) this.posZ, meteorID, new boolean[]{hasTerrae, hasOrbisTerrae, hasCrystallos, hasIncendium, hasTennebrae});
|
||||
|
||||
this.setDead();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.projectile;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.common.registry.IThrowableEntity;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.particle.EntityCloudFX;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
@ -9,10 +13,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.common.registry.IThrowableEntity;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
//Shamelessly ripped off from x3n0ph0b3
|
||||
public class EntityParticleBeam extends Entity implements IProjectile, IThrowableEntity
|
||||
|
@ -205,31 +205,29 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl
|
|||
posZ += motionZ;
|
||||
MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ);
|
||||
this.setPosition(posX, posY, posZ);
|
||||
|
||||
|
||||
this.doFiringParticles();
|
||||
|
||||
if(Math.pow(posX - xDest, 2) + Math.pow(posY - yDest, 2) + Math.pow(posZ - zDest, 2) <= 1)
|
||||
|
||||
if (Math.pow(posX - xDest, 2) + Math.pow(posY - yDest, 2) + Math.pow(posZ - zDest, 2) <= 1)
|
||||
{
|
||||
this.scheduledForDeath = true;
|
||||
this.scheduledForDeath = true;
|
||||
}
|
||||
|
||||
if(this.scheduledForDeath)
|
||||
|
||||
if (this.scheduledForDeath)
|
||||
{
|
||||
this.setDead();
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
public void doFiringParticles()
|
||||
{
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
return;
|
||||
}
|
||||
//worldObj.spawnParticle("mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D);
|
||||
EntityFX particle = new EntityCloudFX(worldObj, posX, posY, posZ, 0, 0, 0);
|
||||
particle.setRBGColorF(colourRed + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()), colourGreen + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()), colourBlue + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()));
|
||||
FMLClientHandler.instance().getClient().effectRenderer.addEffect(particle);
|
||||
//worldObj.spawnParticle("happyVillager", posX, posY, posZ, 0, 0, 0);
|
||||
if (!worldObj.isRemote)
|
||||
{
|
||||
return;
|
||||
}
|
||||
EntityFX particle = new EntityCloudFX(worldObj, posX, posY, posZ, 0, 0, 0);
|
||||
particle.setRBGColorF(colourRed + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()), colourGreen + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()), colourBlue + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()));
|
||||
FMLClientHandler.instance().getClient().effectRenderer.addEffect(particle);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -319,32 +317,32 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl
|
|||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Entity getThrower()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return this.shootingEntity;
|
||||
}
|
||||
@Override
|
||||
public Entity getThrower()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return this.shootingEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setThrower(Entity entity)
|
||||
{
|
||||
if(entity instanceof EntityLivingBase)
|
||||
this.shootingEntity = (EntityLivingBase)entity;
|
||||
|
||||
}
|
||||
|
||||
public void setColour(float red, float green, float blue)
|
||||
{
|
||||
this.colourRed = red;
|
||||
this.colourGreen = green;
|
||||
this.colourBlue = blue;
|
||||
}
|
||||
|
||||
public void setDestination(int xDest, int yDest, int zDest)
|
||||
{
|
||||
this.xDest = xDest;
|
||||
this.yDest = yDest;
|
||||
this.zDest = zDest;
|
||||
}
|
||||
@Override
|
||||
public void setThrower(Entity entity)
|
||||
{
|
||||
if (entity instanceof EntityLivingBase)
|
||||
this.shootingEntity = (EntityLivingBase) entity;
|
||||
|
||||
}
|
||||
|
||||
public void setColour(float red, float green, float blue)
|
||||
{
|
||||
this.colourRed = red;
|
||||
this.colourGreen = green;
|
||||
this.colourBlue = blue;
|
||||
}
|
||||
|
||||
public void setDestination(int xDest, int yDest, int zDest)
|
||||
{
|
||||
this.xDest = xDest;
|
||||
this.yDest = yDest;
|
||||
this.zDest = zDest;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,22 +50,8 @@ public class ExplosionProjectile extends EnergyBlastProjectile
|
|||
}
|
||||
|
||||
worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float) (2), causesEnvDamage);
|
||||
//this.onImpact(mop.entityHit);
|
||||
} else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
{
|
||||
// for(int i=-1;i<=1;i++)
|
||||
// {
|
||||
// for(int j=-1;j<=1;j++)
|
||||
// {
|
||||
// for(int k=-1;k<=1;k++)
|
||||
// {
|
||||
// if(worldObj.isAirBlock((int)this.posX+i, (int)this.posY+j, (int)this.posZ+k))
|
||||
// {
|
||||
// worldObj.setBlock( (int)this.posX+i, (int)this.posY+j, (int)this.posZ+k,Block.fire.blockID);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float) (2), causesEnvDamage);
|
||||
}
|
||||
|
||||
|
@ -81,12 +67,8 @@ public class ExplosionProjectile extends EnergyBlastProjectile
|
|||
this.setDead();
|
||||
} else
|
||||
{
|
||||
//doDamage(8 + d6(), mop);
|
||||
if (mop instanceof EntityLivingBase)
|
||||
{
|
||||
//((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2));
|
||||
//((EntityLivingBase)mop).setFire(50);
|
||||
//((EntityLivingBase)mop).setRevengeTarget(shootingEntity);
|
||||
if (((EntityLivingBase) mop).isImmuneToFire())
|
||||
{
|
||||
doDamage((int) (projectileDamage), mop);
|
||||
|
@ -95,13 +77,10 @@ public class ExplosionProjectile extends EnergyBlastProjectile
|
|||
doDamage(projectileDamage, mop);
|
||||
}
|
||||
}
|
||||
|
||||
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
|
||||
}
|
||||
|
||||
if (worldObj.isAirBlock((int) this.posX, (int) this.posY, (int) this.posZ))
|
||||
{
|
||||
//worldObj.setBlock((int)this.posX, (int)this.posY, (int)this.posZ,Block.fire.blockID);
|
||||
}
|
||||
|
||||
spawnHitParticles("magicCrit", 8);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.projectile;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
@ -68,8 +67,6 @@ public class FireProjectile extends EnergyBlastProjectile
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
|
||||
}
|
||||
|
||||
this.setDead();
|
||||
|
@ -84,10 +81,8 @@ public class FireProjectile extends EnergyBlastProjectile
|
|||
this.setDead();
|
||||
} else
|
||||
{
|
||||
//doDamage(8 + d6(), mop);
|
||||
if (mop instanceof EntityLivingBase)
|
||||
{
|
||||
//((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2));
|
||||
((EntityLivingBase) mop).setFire(50);
|
||||
((EntityLivingBase) mop).setRevengeTarget(shootingEntity);
|
||||
|
||||
|
@ -100,8 +95,6 @@ public class FireProjectile extends EnergyBlastProjectile
|
|||
((EntityLivingBase) mop).hurtResistantTime = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
|
||||
}
|
||||
|
||||
if (worldObj.isAirBlock((int) this.posX, (int) this.posY, (int) this.posZ))
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.projectile;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.PacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class HolyProjectile extends EnergyBlastProjectile
|
||||
{
|
||||
|
@ -54,19 +53,6 @@ public class HolyProjectile extends EnergyBlastProjectile
|
|||
this.onImpact(mop.entityHit);
|
||||
} else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
{
|
||||
// for(int i=-1;i<=1;i++)
|
||||
// {
|
||||
// for(int j=-1;j<=1;j++)
|
||||
// {
|
||||
// for(int k=-1;k<=1;k++)
|
||||
// {
|
||||
// if(worldObj.isAirBlock((int)this.posX+i, (int)this.posY+j, (int)this.posZ+k))
|
||||
// {
|
||||
// worldObj.setBlock( (int)this.posX+i, (int)this.posY+j, (int)this.posZ+k,Block.fire.blockID);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
this.setDead();
|
||||
|
@ -81,12 +67,8 @@ public class HolyProjectile extends EnergyBlastProjectile
|
|||
this.setDead();
|
||||
} else
|
||||
{
|
||||
//doDamage(8 + d6(), mop);
|
||||
if (mop instanceof EntityLivingBase)
|
||||
{
|
||||
//((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2));
|
||||
//((EntityLivingBase)mop).setFire(50);
|
||||
//((EntityLivingBase)mop).setRevengeTarget(shootingEntity);
|
||||
if (((EntityLivingBase) mop).isEntityUndead())
|
||||
{
|
||||
doDamage((int) (projectileDamage * 2), mop);
|
||||
|
@ -95,13 +77,10 @@ public class HolyProjectile extends EnergyBlastProjectile
|
|||
doDamage(projectileDamage, mop);
|
||||
}
|
||||
}
|
||||
|
||||
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
|
||||
}
|
||||
|
||||
if (worldObj.isAirBlock((int) this.posX, (int) this.posY, (int) this.posZ))
|
||||
{
|
||||
//worldObj.setBlock((int)this.posX, (int)this.posY, (int)this.posZ,Block.fire.blockID);
|
||||
}
|
||||
|
||||
spawnHitParticles("magicCrit", 8);
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.projectile;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityIceDemon;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.potion.Potion;
|
||||
|
@ -7,9 +9,6 @@ import net.minecraft.potion.PotionEffect;
|
|||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.PacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityIceDemon;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class IceProjectile extends EnergyBlastProjectile
|
||||
{
|
||||
|
@ -57,22 +56,7 @@ public class IceProjectile extends EnergyBlastProjectile
|
|||
this.onImpact(mop.entityHit);
|
||||
} else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
{
|
||||
// for(int i=-1;i<=1;i++)
|
||||
// {
|
||||
// for(int j=-1;j<=1;j++)
|
||||
// {
|
||||
// for(int k=-1;k<=1;k++)
|
||||
// {
|
||||
// if(worldObj.isAirBlock((int)this.posX+i, (int)this.posY+j, (int)this.posZ+k))
|
||||
// {
|
||||
// worldObj.setBlock( (int)this.posX+i, (int)this.posY+j, (int)this.posZ+k,Block.fire.blockID);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
|
||||
}
|
||||
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
|
@ -85,12 +69,8 @@ public class IceProjectile extends EnergyBlastProjectile
|
|||
this.setDead();
|
||||
} else
|
||||
{
|
||||
//doDamage(8 + d6(), mop);
|
||||
if (mop instanceof EntityLivingBase)
|
||||
{
|
||||
//((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2));
|
||||
//((EntityLivingBase)mop).setFire(50);
|
||||
//((EntityLivingBase)mop).setRevengeTarget(shootingEntity);
|
||||
if (((EntityLivingBase) mop).isImmuneToFire())
|
||||
{
|
||||
doDamage((int) (projectileDamage * 2), mop);
|
||||
|
@ -101,8 +81,6 @@ public class IceProjectile extends EnergyBlastProjectile
|
|||
((EntityLivingBase) mop).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 100, 1));
|
||||
}
|
||||
}
|
||||
|
||||
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
|
||||
}
|
||||
|
||||
if (worldObj.isAirBlock((int) this.posX, (int) this.posY, (int) this.posZ))
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.projectile;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.effect.EntityLightningBolt;
|
||||
|
@ -7,7 +8,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class LightningBoltProjectile extends EnergyBlastProjectile
|
||||
{
|
||||
|
@ -68,23 +68,11 @@ public class LightningBoltProjectile extends EnergyBlastProjectile
|
|||
{
|
||||
if (mop == shootingEntity && ticksInAir > 3)
|
||||
{
|
||||
//shootingEntity.attackEntityFrom(DamageSource.causePlayerDamage(shootingEntity), 1);
|
||||
this.setDead();
|
||||
} else
|
||||
{
|
||||
//doDamage(8 + d6(), mop);
|
||||
if (mop instanceof EntityLivingBase)
|
||||
{
|
||||
//((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2));
|
||||
//((EntityLivingBase)mop).setFire(50);
|
||||
//((EntityLivingBase)mop).setRevengeTarget(shootingEntity);
|
||||
// if(((EntityLivingBase)mop).isEntityUndead())
|
||||
// {
|
||||
// doDamage((int)(projectileDamage*2),mop);
|
||||
// }else
|
||||
// {
|
||||
// doDamage(projectileDamage, mop);
|
||||
// }
|
||||
if (causeLightning)
|
||||
{
|
||||
this.worldObj.addWeatherEffect(new EntityLightningBolt(this.worldObj, ((EntityLivingBase) mop).posX, ((EntityLivingBase) mop).posY, ((EntityLivingBase) mop).posZ));
|
||||
|
@ -92,11 +80,7 @@ public class LightningBoltProjectile extends EnergyBlastProjectile
|
|||
{
|
||||
doDamage(projectileDamage, mop);
|
||||
}
|
||||
|
||||
//((EntityLivingBase)mop).setVelocity(this.motionX*2, ((EntityLivingBase)mop).motionY+1.5, this.motionZ*2);
|
||||
}
|
||||
|
||||
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
|
||||
}
|
||||
|
||||
spawnHitParticles("magicCrit", 8);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.projectile;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -8,8 +9,6 @@ import net.minecraft.potion.PotionEffect;
|
|||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.PacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class MudProjectile extends EnergyBlastProjectile
|
||||
{
|
||||
|
@ -72,23 +71,11 @@ public class MudProjectile extends EnergyBlastProjectile
|
|||
{
|
||||
if (mop == shootingEntity && ticksInAir > 3)
|
||||
{
|
||||
//shootingEntity.attackEntityFrom(DamageSource.causePlayerDamage(shootingEntity), 1);
|
||||
this.setDead();
|
||||
} else
|
||||
{
|
||||
//doDamage(8 + d6(), mop);
|
||||
if (mop instanceof EntityLivingBase)
|
||||
{
|
||||
//((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2));
|
||||
//((EntityLivingBase)mop).setFire(50);
|
||||
//((EntityLivingBase)mop).setRevengeTarget(shootingEntity);
|
||||
// if(((EntityLivingBase)mop).isEntityUndead())
|
||||
// {
|
||||
// doDamage((int)(projectileDamage*2),mop);
|
||||
// }else
|
||||
// {
|
||||
// doDamage(projectileDamage, mop);
|
||||
// }
|
||||
if (doesBlindness)
|
||||
{
|
||||
((EntityLivingBase) mop).addPotionEffect(new PotionEffect(Potion.blindness.id, 100, 0));
|
||||
|
@ -96,12 +83,8 @@ public class MudProjectile extends EnergyBlastProjectile
|
|||
{
|
||||
((EntityLivingBase) mop).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 100, 2));
|
||||
}
|
||||
|
||||
doDamage(projectileDamage, mop);
|
||||
//((EntityLivingBase)mop).setVelocity(this.motionX*2, ((EntityLivingBase)mop).motionY+1.5, this.motionZ*2);
|
||||
}
|
||||
|
||||
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
|
||||
}
|
||||
|
||||
spawnHitParticles("magicCrit", 8);
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.projectile;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
|
@ -9,12 +11,10 @@ import net.minecraft.util.MovingObjectPosition;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.living.EnderTeleportEvent;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport;
|
||||
|
||||
public class TeleportProjectile extends EnergyBlastProjectile
|
||||
{
|
||||
private boolean isEntityTeleport; //True if the entity firing teleports on hit
|
||||
private boolean isEntityTeleport;
|
||||
|
||||
public TeleportProjectile(World par1World)
|
||||
{
|
||||
|
@ -75,8 +75,7 @@ public class TeleportProjectile extends EnergyBlastProjectile
|
|||
{
|
||||
EntityPlayerMP entityplayermp = (EntityPlayerMP) shootingEntity;
|
||||
|
||||
if(entityplayermp.worldObj == this.worldObj)
|
||||
//if (!entityplayermp.playerNetServerHandler.connectionClosed && entityplayermp.worldObj == this.worldObj)
|
||||
if (entityplayermp.worldObj == this.worldObj)
|
||||
{
|
||||
EnderTeleportEvent event = new EnderTeleportEvent(entityplayermp, this.posX, this.posY, this.posZ, 5.0F);
|
||||
|
||||
|
@ -86,10 +85,7 @@ public class TeleportProjectile extends EnergyBlastProjectile
|
|||
{
|
||||
shootingEntity.mountEntity((Entity) null);
|
||||
}
|
||||
|
||||
shootingEntity.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ);
|
||||
// this.getThrower().fallDistance = 0.0F;
|
||||
// this.getThrower().attackEntityFrom(DamageSource.fall, event.attackDamage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -104,34 +100,19 @@ public class TeleportProjectile extends EnergyBlastProjectile
|
|||
{
|
||||
if (mop == shootingEntity && ticksInAir > 3)
|
||||
{
|
||||
//shootingEntity.attackEntityFrom(DamageSource.causePlayerDamage(shootingEntity), 1);
|
||||
this.setDead();
|
||||
} else
|
||||
{
|
||||
//doDamage(8 + d6(), mop);
|
||||
if (mop instanceof EntityLivingBase)
|
||||
{
|
||||
//((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2));
|
||||
//((EntityLivingBase)mop).setFire(50);
|
||||
//((EntityLivingBase)mop).setRevengeTarget(shootingEntity);
|
||||
// if(((EntityLivingBase)mop).isEntityUndead())
|
||||
// {
|
||||
// doDamage((int)(projectileDamage*2),mop);
|
||||
// }else
|
||||
// {
|
||||
// doDamage(projectileDamage, mop);
|
||||
// }
|
||||
if (isEntityTeleport)
|
||||
{
|
||||
if (shootingEntity != null && shootingEntity instanceof EntityPlayerMP)
|
||||
{
|
||||
EntityPlayerMP entityplayermp = (EntityPlayerMP) shootingEntity;
|
||||
|
||||
if(entityplayermp.worldObj == this.worldObj)
|
||||
//if (!entityplayermp.playerNetServerHandler.connectionClosed && entityplayermp.worldObj == this.worldObj)
|
||||
if (entityplayermp.worldObj == this.worldObj)
|
||||
{
|
||||
EnderTeleportEvent event = new EnderTeleportEvent(entityplayermp, this.posX, this.posY, this.posZ, 5.0F);
|
||||
|
||||
if (!MinecraftForge.EVENT_BUS.post(event))
|
||||
{
|
||||
if (shootingEntity.isRiding())
|
||||
|
@ -140,42 +121,14 @@ public class TeleportProjectile extends EnergyBlastProjectile
|
|||
}
|
||||
|
||||
shootingEntity.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ);
|
||||
// this.getThrower().fallDistance = 0.0F;
|
||||
// this.getThrower().attackEntityFrom(DamageSource.fall, event.attackDamage);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
// int x = (int)this.posX + mop.worldObj.rand.nextInt(100) - mop.worldObj.rand.nextInt(100);
|
||||
// int y = (int)this.posY + mop.worldObj.rand.nextInt(10) - mop.worldObj.rand.nextInt(10);
|
||||
// int z = (int)this.posZ + mop.worldObj.rand.nextInt(100) - mop.worldObj.rand.nextInt(100);
|
||||
//
|
||||
// boolean bool = false;
|
||||
// int i = 0;
|
||||
//
|
||||
// while(!bool&&i<100)
|
||||
// {
|
||||
// if(worldObj.isAirBlock(x, y, z)||worldObj.isAirBlock(x, y+1, z))
|
||||
// {
|
||||
// ((EntityLivingBase) mop).setPositionAndUpdate(x, y, z);
|
||||
// bool=true;
|
||||
// }else
|
||||
// {
|
||||
// x = (int)this.posX + mop.worldObj.rand.nextInt(100) - mop.worldObj.rand.nextInt(100);
|
||||
// y = (int)this.posY + mop.worldObj.rand.nextInt(10) - mop.worldObj.rand.nextInt(10);
|
||||
// z = (int)this.posZ + mop.worldObj.rand.nextInt(100) - mop.worldObj.rand.nextInt(100);
|
||||
// i++;
|
||||
// }
|
||||
// }
|
||||
SpellTeleport.teleportRandomly((EntityLivingBase) mop, 64);
|
||||
}
|
||||
|
||||
//doDamage(projectileDamage, mop);
|
||||
//((EntityLivingBase)mop).setVelocity(this.motionX*2, ((EntityLivingBase)mop).motionY+1.5, this.motionZ*2);
|
||||
}
|
||||
|
||||
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
|
||||
}
|
||||
|
||||
spawnHitParticles("magicCrit", 8);
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.projectile;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.PacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class WaterProjectile extends EnergyBlastProjectile
|
||||
{
|
||||
|
@ -61,23 +60,11 @@ public class WaterProjectile extends EnergyBlastProjectile
|
|||
{
|
||||
if (mop == shootingEntity && ticksInAir > 3)
|
||||
{
|
||||
//shootingEntity.attackEntityFrom(DamageSource.causePlayerDamage(shootingEntity), 1);
|
||||
this.setDead();
|
||||
} else
|
||||
{
|
||||
//doDamage(8 + d6(), mop);
|
||||
if (mop instanceof EntityLivingBase)
|
||||
{
|
||||
//((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2));
|
||||
//((EntityLivingBase)mop).setFire(50);
|
||||
//((EntityLivingBase)mop).setRevengeTarget(shootingEntity);
|
||||
// if(((EntityLivingBase)mop).isEntityUndead())
|
||||
// {
|
||||
// doDamage((int)(projectileDamage*2),mop);
|
||||
// }else
|
||||
// {
|
||||
// doDamage(projectileDamage, mop);
|
||||
// }
|
||||
if (((EntityLivingBase) mop).isImmuneToFire())
|
||||
{
|
||||
doDamage(projectileDamage * 2, mop);
|
||||
|
@ -87,11 +74,7 @@ public class WaterProjectile extends EnergyBlastProjectile
|
|||
doDamage(projectileDamage, mop);
|
||||
((EntityLivingBase) mop).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 80, 0));
|
||||
}
|
||||
|
||||
//((EntityLivingBase)mop).setVelocity(this.motionX*2, ((EntityLivingBase)mop).motionY+1.5, this.motionZ*2);
|
||||
}
|
||||
|
||||
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
|
||||
}
|
||||
|
||||
spawnHitParticles("magicCrit", 8);
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.entity.projectile;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class WindGustProjectile extends EnergyBlastProjectile
|
||||
{
|
||||
|
@ -48,19 +48,6 @@ public class WindGustProjectile extends EnergyBlastProjectile
|
|||
this.onImpact(mop.entityHit);
|
||||
} else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
{
|
||||
// for(int i=-1;i<=1;i++)
|
||||
// {
|
||||
// for(int j=-1;j<=1;j++)
|
||||
// {
|
||||
// for(int k=-1;k<=1;k++)
|
||||
// {
|
||||
// if(worldObj.isAirBlock((int)this.posX+i, (int)this.posY+j, (int)this.posZ+k))
|
||||
// {
|
||||
// worldObj.setBlock( (int)this.posX+i, (int)this.posY+j, (int)this.posZ+k,Block.fire.blockID);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
this.setDead();
|
||||
|
@ -71,30 +58,15 @@ public class WindGustProjectile extends EnergyBlastProjectile
|
|||
{
|
||||
if (mop == shootingEntity && ticksInAir > 3)
|
||||
{
|
||||
//shootingEntity.attackEntityFrom(DamageSource.causePlayerDamage(shootingEntity), 1);
|
||||
this.setDead();
|
||||
} else
|
||||
{
|
||||
//doDamage(8 + d6(), mop);
|
||||
if (mop instanceof EntityLivingBase)
|
||||
{
|
||||
//((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2));
|
||||
//((EntityLivingBase)mop).setFire(50);
|
||||
//((EntityLivingBase)mop).setRevengeTarget(shootingEntity);
|
||||
// if(((EntityLivingBase)mop).isEntityUndead())
|
||||
// {
|
||||
// doDamage((int)(projectileDamage*2),mop);
|
||||
// }else
|
||||
// {
|
||||
// doDamage(projectileDamage, mop);
|
||||
// }
|
||||
((EntityLivingBase) mop).motionX = this.motionX * 2;
|
||||
((EntityLivingBase) mop).motionY = 1.5;
|
||||
((EntityLivingBase) mop).motionZ = this.motionZ * 2;
|
||||
//((EntityLivingBase)mop).setVelocity(this.motionX*2, ((EntityLivingBase)mop).motionY+1.5, this.motionZ*2);
|
||||
}
|
||||
|
||||
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
|
||||
}
|
||||
|
||||
spawnHitParticles("magicCrit", 8);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue