Update to Minecraft 1.9

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2016-03-01 08:32:46 +11:00
parent 2da480a9c8
commit 21d4bf5d1f
305 changed files with 6684 additions and 6105 deletions

View File

@@ -8,9 +8,9 @@
public class ItemFishingRod extends Item {
public ItemFishingRod() {
@@ -15,9 +17,18 @@
@@ -17,9 +19,18 @@
itemstack.damage(i, entityhuman);
entityhuman.bw();
entityhuman.a(enumhand);
} else {
+ // CraftBukkit start
+ EntityFishingHook hook = new EntityFishingHook(world, entityhuman);
@@ -18,13 +18,13 @@
+ world.getServer().getPluginManager().callEvent(playerFishEvent);
+
+ if (playerFishEvent.isCancelled()) {
+ return itemstack;
+ return new InteractionResultWrapper(EnumInteractionResult.PASS, itemstack);
+ }
+ // CraftBukkit end
world.makeSound(entityhuman, "random.bow", 0.5F, 0.4F / (ItemFishingRod.g.nextFloat() * 0.4F + 0.8F));
world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.H, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemFishingRod.i.nextFloat() * 0.4F + 0.8F));
if (!world.isClientSide) {
- world.addEntity(new EntityFishingHook(world, entityhuman));
+ world.addEntity(hook); // CraftBukkit - moved creation up
}
entityhuman.bw();
entityhuman.a(enumhand);