go through items a bit

This commit is contained in:
Progwml6 committed 2014-01-05 10:52:01 -05:00
1 parent 67ccd5b7db
commit 199a92f47a
7 files changed
+20 -19

No files matched your search

@@ -138,7 +138,7 @@ public class ToolStationContainer extends ActiveContainer
int amount = logic.getStackInSlot(1).getItem() instanceof ToolCore ? stack.stackSize : 1;
logic.decrStackSize(1, amount);
logic.worldObj.playSoundEffect(logic.xCoord, logic.yCoord, logic.zCoord, "tinker:little_saw", 1.0F, (random.nextFloat() - random.nextFloat()) * 0.2F + 1.0F);
logic.func_145831_w().playSoundEffect(logic.xCoord, logic.yCoord, logic.zCoord, "tinker:little_saw", 1.0F, (random.nextFloat() - random.nextFloat()) * 0.2F + 1.0F);
}
}
@@ -34,22 +34,22 @@ public class DiamondApple extends ItemFood
potion = player.getActivePotionEffect(Potion.resistance);
if (potion != null)
duration = potion.duration;
duration = potion.getDuration();
player.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, duration + 60 * 40, 4));
potion = player.getActivePotionEffect(Potion.resistance);
if (potion != null)
duration = potion.duration;
duration = potion.getDuration();
player.addPotionEffect(new PotionEffect(Potion.resistance.id, duration + 60 * 20, 0));
potion = player.getActivePotionEffect(Potion.digSpeed);
if (potion != null)
duration = potion.duration;
duration = potion.getDuration();
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, duration + 60 * 20, 0));
potion = player.getActivePotionEffect(Potion.damageBoost);
if (potion != null)
duration = potion.duration;
duration = potion.getDuration();
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, duration + 60 * 20, 0));
}
}
+1 -1
View File
@@ -54,7 +54,7 @@ public class Jerky extends SpecialFood
int duration = 20 * 30;
PotionEffect potion = player.getActivePotionEffect(Potion.regeneration);
if (potion != null)
duration = potion.duration;
duration = potion.getDuration();
player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, duration + 20 * 30, 0));
}
}
@@ -9,6 +9,7 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingData;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Facing;
@@ -64,7 +65,7 @@ public class TitleIcon extends Item
{
return getIconFromDamage(par1);
}
return Item.monsterPlacer.getIconFromDamageForRenderPass(par1, par2);
return Items.monsterPlacer.getIconFromDamageForRenderPass(par1, par2);
}
@SideOnly(Side.CLIENT)
@@ -118,13 +119,13 @@ public class TitleIcon extends Item
{
if (!world.isRemote)
{
int i1 = world.getBlockId(posX, posY, posZ);
Block b = world.getBlock(posX, posY, posZ);
posX += Facing.offsetsXForSide[par7];
posY += Facing.offsetsYForSide[par7];
posZ += Facing.offsetsZForSide[par7];
double d0 = 0.0D;
if (par7 == 1 && Block.blocksList[i1] != null && Block.blocksList[i1].getRenderType() == 11)
if (par7 == 1 && b != null && b.getRenderType() == 11)
{
d0 = 0.5D;
}
@@ -149,13 +150,13 @@ public class TitleIcon extends Item
public static EntityLiving activateSpawnEgg (ItemStack stack, World world, double posX, double posY, double posZ, int par7)
{
int i1 = world.getBlockId((int) posX, (int) posY, (int) posZ);
Block b = world.getBlock((int) posX, (int) posY, (int) posZ);
posX += Facing.offsetsXForSide[par7];
posY += Facing.offsetsYForSide[par7];
posZ += Facing.offsetsZForSide[par7];
double d0 = 0.0D;
if (par7 == 1 && Block.blocksList[i1] != null && Block.blocksList[i1].getRenderType() == 11)
if (par7 == 1 && b != null && b.getRenderType() == 11)
{
d0 = 0.5D;
}
@@ -24,9 +24,9 @@ public class ExoArmor extends ArmorCore
protected static final UUID attack = UUID.fromString("CB3F55A9-629C-4F38-A497-9C13A33DB5CE");
protected static final UUID health = UUID.fromString("CB3F55A9-629C-4F38-A497-9C13A33DB5CD");
protected static final UUID knockback = UUID.fromString("CB3F55A9-629C-4F38-A497-9C13A33DB5CC");
public ExoArmor(int id, EnumArmorPart part, String texture)
public ExoArmor(EnumArmorPart part, String texture)
{
super(id, 0, part);
super(0, part);
this.textureName = texture;
this.setCreativeTab(TConstructRegistry.materialTab);
}
@@ -31,14 +31,14 @@ public class BarricadeItem extends ItemBlock
public boolean onItemUse (ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
{
Block i1 = world.getBlock(x, y, z);
Block b = world.getBlock(x, y, z);
if (i1 == Blocks.snow && (world.getBlockMetadata(x, y, z) & 7) < 1)
if (b == Blocks.snow && (world.getBlockMetadata(x, y, z) & 7) < 1)
{
side = 1;
}
else if (i1 != Blocks.vine && i1 != Blocks.tallgrass && i1 != Blocks.deadbush
&& (Block.blocksList[i1] == null || !Block.blocksList[i1].isBlockReplaceable(world, x, y, z)))
else if (b != Blocks.vine && b != Blocks.tallgrass && b != Blocks.deadbush
&& (b == null || !b.isBlockReplaceable(world, x, y, z)))
{
if (side == 0)
{
@@ -59,12 +59,12 @@ public class ItemBlockLandmine extends ItemBlock
@Override
public boolean placeBlockAt (ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata)
{
if (!world.setBlock(x, y, z, TRepo.landmine.blockID, metadata, 3))
if (!world.setBlock(x, y, z, TRepo.landmine, metadata, 3))
{
return false;
}
if (world.getBlockId(x, y, z) == TRepo.landmine.blockID)
if (world.getBlock(x, y, z) == TRepo.landmine)
{
TRepo.landmine.onBlockPlacedBy(world, x, y, z, player, stack);