Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
1package net.minecraft.server;
2
3public class ItemSword extends Item {
4
5 private int a;
6
7 public ItemSword(int i, EnumToolMaterial enumtoolmaterial) {
8 super(i);
9 this.maxStackSize = 1;
10 this.d(enumtoolmaterial.a());
11 this.a = 4 + enumtoolmaterial.c() * 2;
12 }
13
14 public float a(ItemStack itemstack, Block block) {
15 return block.id == Block.WEB.id ? 15.0F : 1.5F;
16 }
17
18 public boolean a(ItemStack itemstack, EntityLiving entityliving, EntityLiving entityliving1) {
19 itemstack.damage(1, entityliving1);
20 return true;
21 }
22
23 public boolean a(ItemStack itemstack, int i, int j, int k, int l, EntityLiving entityliving) {
24 itemstack.damage(2, entityliving);
25 return true;
26 }
27
28 public int a(Entity entity) {
29 return this.a;
30 }
31
32 public boolean a(Block block) {
33 return block.id == Block.WEB.id;
34 }
35}