More 1.7 stuffs

This commit is contained in:
Arthur Uzulin committed 2014-01-19 17:20:12 +11:00
1 parent 3f4c54fc8e
commit f225fac8e7
7 files changed
+114 -81

No files matched your search

@@ -35,7 +35,7 @@ public class SmelteryDamageSource extends DamageSource
String s = "death." + type + this.damageType;
String s1 = s + ".player";
return entityliving1 != null && StatCollector.func_94522_b(s1) ? StatCollector.translateToLocalFormatted(s1,
new Object[] { par1EntityLiving..getTranslatedEntityName(), entityliving1.getTranslatedEntityName() }) : StatCollector.translateToLocalFormatted(s,
new Object[] { par1EntityLiving.getTranslatedEntityName(), entityliving1.getTranslatedEntityName() }) : StatCollector.translateToLocalFormatted(s,
new Object[] { par1EntityLiving.getTranslatedEntityName() });
}
}
@@ -52,21 +52,23 @@ public abstract class Behavior
addBehavior(new ItemStack(Blocks.tnt), explosive);
addBehavior(new ItemStack(Items.fireworks), firework);
addBehavior(new ItemStack(Items.potionitem), potion);
addBehavior(new ItemStack(Items.fireballCharge), fireball);
addBehavior(new ItemStack(Items.monsterPlacer), spawn);
addBehavior(new ItemStack(Items.fire_charge), fireball);
addBehavior(new ItemStack(Items.spawn_egg), spawn);
addBehavior(new ItemStack(Items.arrow), shoot);
addBehavior(new ItemStack(Items.snowball), shoot);
addBehavior(new ItemStack(Items.ender_pearl), shoot);
addBehavior(new ItemStack(Items.shears), shear);
//Make sure the part below this comment is executed last(to avoid conflicts)
for (int i = 1; i < Block.blocksList.length; i++)
{
if (Block.blocksList[i] != null && Block.blocksList[i].isOpaqueCube() && Block.blocksList[i].renderAsNormalBlock() && !(Block.blocksList[i] instanceof ITileEntityProvider)
&& !behaviorsListBlocks.containsKey(new ItemStack(Block.blocksList[i])))
{
addBehavior(new ItemStack(Block.blocksList[i]), blockThrow);
}
Iterator i1 = Block.field_149771_c.iterator();
while(i1.hasNext()){
Object ob = i1.next();
if(ob != null && ob instanceof Block){
Block b = (Block) ob;
if(b.func_149688_o().isOpaque() && b.func_149686_d() && !b.func_149744_f() && !(b instanceof ITileEntityProvider) && !behaviorsListBlocks.containsKey(new ItemStack(b))){
addBehavior(new ItemStack(b), blockThrow);
}
}
}
}
@@ -68,7 +68,7 @@ public class BehaviorBlockThrow extends Behavior
EntityFallingBlock entityfallingsand = new EntityFallingBlock(par1World, (double) ((float) par2 + 0.5F), (double) ((float) par3 + 2F), (double) ((float) par4 + 0.5F), BlockUtils.getBlockFromItemStack(par5ItemStack),
par5ItemStack.getItemDamage());
entityfallingsand.preventEntitySpawning = false;
entityfallingsand.fallTime = 2;
entityfallingsand.ticksExisted = 2;
entityfallingsand.setVelocity(vec0, vec1, vec2);
par1World.spawnEntityInWorld(entityfallingsand);
}
@@ -43,10 +43,10 @@ public class BehaviorFirecharge extends Behavior
{
for (int j = par4 - 2; j <= (par4 + 2); j++)
{
if ((par1World.getBlock(i, par3, j) == 0 || (par1World.getBlock(i, par3, j) != null && par1World.getBlock(i, par3, j).isBlockReplaceable(
par1World, i, par3, j))) && ItemBlockLandmine.getRandom().nextInt(5) == 0 && Blocks.fire.canPlaceBlockAt(par1World, i, par3, j))
if ((par1World.func_147439_a(i, par3, j) == null || (par1World.func_147439_a(i, par3, j) != null && par1World.func_147439_a(i, par3, j).isReplaceable(
par1World, i, par3, j))) && ItemBlockLandmine.getRandom().nextInt(5) == 0 && Blocks.fire.func_149742_c(par1World, i, par3, j))
{
par1World.field_145850_b(i, par3, j, Blocks.fire);
par1World.func_147449_b(i, par3, j, Blocks.fire);
}
}
}
@@ -46,13 +46,13 @@ public class BehaviorPotion extends Behavior
{
if (triggerer instanceof EntityPlayer)
{
Items.potion.onEaten(par5ItemStack, par1World, (EntityPlayer) triggerer);
Items.potionitem.onEaten(par5ItemStack, par1World, (EntityPlayer) triggerer);
}
else if (triggerer instanceof EntityLivingBase)
{
if (!par1World.isRemote)
{
List list = Items.potion.getEffects(par5ItemStack);
List list = Items.potionitem.getEffects(par5ItemStack);
if (list != null)
{