Update to Minecraft 1.11.1

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2016-12-21 07:00:00 +11:00
parent 74902a47aa
commit f9a809b2ba
29 changed files with 368 additions and 334 deletions

View File

@@ -8,14 +8,19 @@
public class ItemFishingRod extends Item {
public ItemFishingRod() {
@@ -19,9 +21,18 @@
@@ -19,7 +21,6 @@
itemstack.damage(i, entityhuman);
entityhuman.a(enumhand);
} else {
- world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.I, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemFishingRod.j.nextFloat() * 0.4F + 0.8F));
if (!world.isClientSide) {
+ // CraftBukkit start
EntityFishingHook entityfishinghook = new EntityFishingHook(world, entityhuman);
int j = EnchantmentManager.c(itemstack);
@@ -34,6 +35,17 @@
entityfishinghook.b(k);
}
+ // CraftBukkit start
+ PlayerFishEvent playerFishEvent = new PlayerFishEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), null, (org.bukkit.entity.Fish) entityfishinghook.getBukkitEntity(), PlayerFishEvent.State.FISHING);
+ world.getServer().getPluginManager().callEvent(playerFishEvent);
+
@@ -25,6 +30,7 @@
+ }
+ world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.I, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemFishingRod.j.nextFloat() * 0.4F + 0.8F));
+ // CraftBukkit end
+
world.addEntity(entityfishinghook);
}