Update CraftBukkit to Minecraft 1.7.2
This commit is contained in:
@@ -4,19 +4,18 @@ import org.bukkit.event.player.PlayerFishEvent; // CraftBukkit
|
||||
|
||||
public class ItemFishingRod extends Item {
|
||||
|
||||
public ItemFishingRod(int i) {
|
||||
super(i);
|
||||
public ItemFishingRod() {
|
||||
this.setMaxDurability(64);
|
||||
this.d(1);
|
||||
this.e(1);
|
||||
this.a(CreativeModeTab.i);
|
||||
}
|
||||
|
||||
public ItemStack a(ItemStack itemstack, World world, EntityHuman entityhuman) {
|
||||
if (entityhuman.hookedFish != null) {
|
||||
int i = entityhuman.hookedFish.c();
|
||||
int i = entityhuman.hookedFish.e();
|
||||
|
||||
itemstack.damage(i, entityhuman);
|
||||
entityhuman.aV();
|
||||
entityhuman.ba();
|
||||
} else {
|
||||
// CraftBukkit start
|
||||
EntityFishingHook hook = new EntityFishingHook(world, entityhuman);
|
||||
@@ -27,14 +26,22 @@ public class ItemFishingRod extends Item {
|
||||
return itemstack;
|
||||
}
|
||||
// CraftBukkit end
|
||||
world.makeSound(entityhuman, "random.bow", 0.5F, 0.4F / (f.nextFloat() * 0.4F + 0.8F));
|
||||
world.makeSound(entityhuman, "random.bow", 0.5F, 0.4F / (g.nextFloat() * 0.4F + 0.8F));
|
||||
if (!world.isStatic) {
|
||||
world.addEntity(hook); // CraftBukkit - moved creation up
|
||||
}
|
||||
|
||||
entityhuman.aV();
|
||||
entityhuman.ba();
|
||||
}
|
||||
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
public boolean e_(ItemStack itemstack) {
|
||||
return super.e_(itemstack);
|
||||
}
|
||||
|
||||
public int c() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user