Fix merge conflicts

This commit is contained in:
mDiyo committed 2013-09-08 20:37:41 -07:00
commit 856b31361d
199 files changed
+947 -322

No files matched your search

+16 -16
View File
@@ -1,15 +1,9 @@
package tconstruct.entity;
import tconstruct.TConstruct;
import tconstruct.common.TContent;
import tconstruct.library.TConstructRegistry;
import tconstruct.library.crafting.ToolBuilder;
import tconstruct.library.tools.ToolCore;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingData;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.SpiderEffectsGroupData;
import net.minecraft.entity.boss.IBossDisplayData;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.monster.EntitySkeleton;
@@ -19,13 +13,17 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.util.StatCollector;
import net.minecraft.world.EnumSkyBlock;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeHooks;
import tconstruct.TConstruct;
import tconstruct.common.TContent;
import tconstruct.library.TConstructRegistry;
import tconstruct.library.crafting.ToolBuilder;
import tconstruct.library.tools.ToolCore;
public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData
{
@@ -53,6 +51,7 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData
this.slimeJumpDelay = this.rand.nextInt(120) + 40;
this.setSlimeSize(size);
this.jumpMovementFactor = 0.004F * size + 0.01F;
this.setHealth(getMaxHealthForSize());
}
protected void damageEntity (DamageSource damageSource, int damage)
@@ -122,13 +121,13 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData
public EntityLivingData func_110161_a (EntityLivingData par1EntityLivingData)
{
Object par1EntityLivingData1 = super.func_110161_a(par1EntityLivingData);
Object par1EntityLivingData1 = super.onSpawnWithEgg(par1EntityLivingData);
if (getSlimeSize() == 2 && rand.nextInt(8) == 0)
{
EntitySkeleton entityskeleton = new EntitySkeleton(this.worldObj);
entityskeleton.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, 0.0F);
entityskeleton.func_110161_a(par1EntityLivingData);
entityskeleton.onSpawnWithEgg(par1EntityLivingData);
this.worldObj.spawnEntityInWorld(entityskeleton);
entityskeleton.mountEntity(this);
}
@@ -136,7 +135,7 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData
{
EntityCreeper creeper = new EntityCreeper(this.worldObj);
creeper.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, 0.0F);
creeper.func_110161_a(par1EntityLivingData);
creeper.onSpawnWithEgg(par1EntityLivingData);
this.worldObj.spawnEntityInWorld(creeper);
creeper.mountEntity(this);
}
@@ -157,7 +156,7 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData
EntitySkeleton skelton = new EntitySkeleton(this.worldObj);
skelton.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, 0.0F);
skelton.func_110161_a(par1EntityLivingData);
skelton.onSpawnWithEgg(par1EntityLivingData);
this.worldObj.spawnEntityInWorld(skelton);
skelton.mountEntity(slime);
}
@@ -274,22 +273,23 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData
this.dataWatcher.updateObject(16, new Byte((byte) size));
this.setSize(0.6F * (float) size, 0.6F * (float) size);
this.setPosition(this.posX, this.posY, this.posZ);
this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(this.getMaxHealth());
this.setEntityHealth(this.func_110138_aP());
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(this.getMaxHealth());
this.setHealth(this.getMaxHealth());
this.experienceValue = size + 2 ^ (size);
if (size >= 8)
this.experienceValue = 500;
}
public int getMaxHealth ()
// Invoked by constructor to set max health dependant on current size
private float getMaxHealthForSize ()
{
int i = this.getSlimeSize();
if (i == 1)
return 4;
if (i == 8)
return 100;
return (int) Math.min(i * i + 8, 49);
return (float)Math.min(i * i + 8, 49);
}
/**
@@ -461,7 +461,7 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData
{
int size = this.getSlimeSize();
if (!this.worldObj.isRemote && size > 1 && this.func_110143_aJ() <= 0 && size < 8)
if (!this.worldObj.isRemote && size > 1 && this.getHealth() <= 0 && size < 8)
{
float f = (-0.5F) * (float) size / 4.0F;
float f1 = (-0.5F) * (float) size / 4.0F;
+4 -2
View File
@@ -11,6 +11,7 @@ public class MetalSlime extends BlueSlime
{
super(world);
//this.texture = "/mods/tinker/textures/mob/slimemetal.png";
this.setHealth(getMaxHealthForSize());
}
public boolean attackEntityFrom (DamageSource damageSource, int damage)
@@ -20,12 +21,13 @@ public class MetalSlime extends BlueSlime
return super.attackEntityFrom(damageSource, damage);
}
public int getMaxHealth ()
// Invoked by constructor to set max health dependant on current size
private float getMaxHealthForSize ()
{
int i = this.getSlimeSize();
if (i == 1)
return 4;
return (int) Math.min(i * i + 20, 100);
return (float) Math.min(i * i + 20, 100);
}
public int getTotalArmorValue ()
@@ -186,7 +186,7 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
{
EntityPlayer entityplayer = (EntityPlayer) movingobjectposition.entityHit;
if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer) this.shootingEntity).func_96122_a(entityplayer))
if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer) this.shootingEntity).canAttackPlayer(entityplayer))
{
movingobjectposition = null;
}