Updated Upstream (Bukkit/CraftBukkit)

Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
e041de28 SPIGOT-4946: Add VillagerCareerChangeEvent

CraftBukkit Changes:
fcb9f90b SPIGOT-4946: Add VillagerCareerChangeEvent
a4a2f679 SPIGOT-4987: Shulkerbox does not save empty slots
This commit is contained in:
Spottedleaf 2019-05-27 03:57:28 -07:00
parent 70ce6ce831
commit 01670a5103
12 changed files with 71 additions and 71 deletions

View File

@ -1,11 +1,11 @@
From 51c00e652685a55306c10cd88136a10cd8b108bb Mon Sep 17 00:00:00 2001
From af1a9fc237a515545168decf69757434f9b176aa Mon Sep 17 00:00:00 2001
From: AlphaBlend <whizkid3000@hotmail.com>
Date: Sun, 16 Oct 2016 23:19:30 -0700
Subject: [PATCH] Add EntityZapEvent
diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java
index 01202e4d5..616075569 100644
index 01202e4d53..616075569f 100644
--- a/src/main/java/net/minecraft/server/EntityPig.java
+++ b/src/main/java/net/minecraft/server/EntityPig.java
@@ -168,6 +168,12 @@ public class EntityPig extends EntityAnimal {
@ -22,7 +22,7 @@ index 01202e4d5..616075569 100644
if (CraftEventFactory.callPigZapEvent(this, entitylightning, entitypigzombie).isCancelled()) {
return;
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index 512d18a2b..9ac9d499d 100644
index 512d18a2b7..9ac9d499d5 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -578,6 +578,12 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
@ -39,10 +39,10 @@ index 512d18a2b..9ac9d499d 100644
entitywitch.prepare(this.world, this.world.getDamageScaler(new BlockPosition(entitywitch)), EnumMobSpawn.CONVERSION, (GroupDataEntity) null, (NBTTagCompound) null);
entitywitch.setNoAI(this.isNoAI());
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index e7bd7e1ea..7471251bc 100644
index 1a9e5b4b34..a26ecc86f6 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -996,6 +996,14 @@ public class CraftEventFactory {
@@ -1010,6 +1010,14 @@ public class CraftEventFactory {
return event;
}

View File

@ -1,11 +1,11 @@
From 263b266b8d5554ddd2653c218c4f64540076e779 Mon Sep 17 00:00:00 2001
From cea0a916ca0d6d05c6ae4e120095df1bd3fa0c25 Mon Sep 17 00:00:00 2001
From: AlphaBlend <whizkid3000@hotmail.com>
Date: Thu, 8 Sep 2016 08:48:33 -0700
Subject: [PATCH] Add source to PlayerExpChangeEvent
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
index b20813be6..bfba08fb2 100644
index b20813be64..bfba08fb24 100644
--- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java
+++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
@@ -190,7 +190,7 @@ public class EntityExperienceOrb extends Entity {
@ -18,18 +18,18 @@ index b20813be6..bfba08fb2 100644
this.die();
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 7471251bc..ca6563096 100644
index a26ecc86f6..e597f37903 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -103,6 +103,7 @@ import org.bukkit.entity.Sheep;
import org.bukkit.entity.ThrownExpBottle;
import org.bukkit.entity.ThrownPotion;
@@ -106,6 +106,7 @@ import org.bukkit.entity.ThrownPotion;
import org.bukkit.entity.Vehicle;
import org.bukkit.entity.Villager;
import org.bukkit.entity.Villager.Profession;
+import org.bukkit.entity.ExperienceOrb; // Paper
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.Event.Result;
@@ -959,6 +960,17 @@ public class CraftEventFactory {
@@ -973,6 +974,17 @@ public class CraftEventFactory {
return event;
}

View File

@ -1,11 +1,11 @@
From 03d4c7baae2730503bd1ad440c73ce2306b3a87c Mon Sep 17 00:00:00 2001
From d41feb8d2b107b2522d82a8f72ffe9dc4a33c9b1 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Fri, 16 Dec 2016 21:25:39 -0600
Subject: [PATCH] Add ProjectileCollideEvent
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
index 531bb7f66..bb3ee4320 100644
index 531bb7f663..bb3ee4320d 100644
--- a/src/main/java/net/minecraft/server/EntityArrow.java
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
@@ -184,6 +184,16 @@ public abstract class EntityArrow extends Entity implements IProjectile {
@ -26,7 +26,7 @@ index 531bb7f66..bb3ee4320 100644
this.a((MovingObjectPosition) object);
this.impulse = true;
diff --git a/src/main/java/net/minecraft/server/EntityFireball.java b/src/main/java/net/minecraft/server/EntityFireball.java
index 739e48ec7..192ee928f 100644
index 739e48ec7c..192ee928fa 100644
--- a/src/main/java/net/minecraft/server/EntityFireball.java
+++ b/src/main/java/net/minecraft/server/EntityFireball.java
@@ -67,7 +67,16 @@ public abstract class EntityFireball extends Entity {
@ -48,7 +48,7 @@ index 739e48ec7..192ee928f 100644
// CraftBukkit start - Fire ProjectileHitEvent
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index 3b10043ba..bdd2a39f8 100644
index 3b10043ba1..bdd2a39f89 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -217,7 +217,16 @@ public class EntityFishingHook extends Entity {
@ -70,7 +70,7 @@ index 3b10043ba..bdd2a39f8 100644
if (movingobjectposition.getType() == MovingObjectPosition.EnumMovingObjectType.ENTITY) {
this.hooked = ((MovingObjectPositionEntity) movingobjectposition).getEntity();
diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java
index ac62f836d..bb4679cf7 100644
index ac62f836d1..bb4679cf76 100644
--- a/src/main/java/net/minecraft/server/EntityProjectile.java
+++ b/src/main/java/net/minecraft/server/EntityProjectile.java
@@ -102,7 +102,16 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
@ -92,10 +92,10 @@ index ac62f836d..bb4679cf7 100644
this.c(((MovingObjectPositionBlock) movingobjectposition).getBlockPosition());
} else {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index ca6563096..8f08c1f44 100644
index e597f37903..224d1dbffc 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1100,6 +1100,16 @@ public class CraftEventFactory {
@@ -1114,6 +1114,16 @@ public class CraftEventFactory {
return CraftItemStack.asNMSCopy(bitem);
}

View File

@ -1,11 +1,11 @@
From 200313071eb368d0db320744442eafe908e0c2bd Mon Sep 17 00:00:00 2001
From 52d418e7f754f4a6bc2c5d331130fc5a7e6d210d Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 10 Nov 2017 23:03:12 -0500
Subject: [PATCH] Option for maximum exp value when merging orbs
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index abc967d3f..2a50d6bab 100644
index abc967d3f5..2a50d6babf 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -338,4 +338,10 @@ public class PaperWorldConfig {
@ -20,10 +20,10 @@ index abc967d3f..2a50d6bab 100644
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 8f08c1f44..46531ffbe 100644
index 224d1dbffc..123cefd47c 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -515,16 +515,32 @@ public class CraftEventFactory {
@@ -529,16 +529,32 @@ public class CraftEventFactory {
EntityExperienceOrb xp = (EntityExperienceOrb) entity;
double radius = world.spigotConfig.expMerge;
if (radius > 0) {

View File

@ -1,4 +1,4 @@
From 2d63efb2a34a5f6fbac76c524f6f5689bf24404f Mon Sep 17 00:00:00 2001
From 729de1eed94305f43f0b7c4d8321893b4db384bd Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 19 Dec 2017 22:57:26 -0500
Subject: [PATCH] ExperienceOrbMergeEvent
@ -8,10 +8,10 @@ Plugins can cancel this if they want to ensure experience orbs do not lose impor
metadata such as spawn reason, or conditionally move data from source to target.
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 46531ffbe..4e84f4373 100644
index 123cefd47c..12d4300437 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -525,7 +525,7 @@ public class CraftEventFactory {
@@ -539,7 +539,7 @@ public class CraftEventFactory {
if (e instanceof EntityExperienceOrb) {
EntityExperienceOrb loopItem = (EntityExperienceOrb) e;
// Paper start

View File

@ -1,4 +1,4 @@
From cc53806909130715b4523ff21e3a0fbabd12fec9 Mon Sep 17 00:00:00 2001
From 7c485268911d96a10af630157b83d208318c108b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 15 Jun 2013 19:51:17 -0400
Subject: [PATCH] EntityShootBowEvent consumeArrow and getArrowItem API
@ -6,7 +6,7 @@ Subject: [PATCH] EntityShootBowEvent consumeArrow and getArrowItem API
Adds ability to get what arrow was shot, and control if it should be consumed.
diff --git a/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java b/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java
index e575d3cff..85157e80d 100644
index e575d3cff7..85157e80d2 100644
--- a/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java
+++ b/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java
@@ -157,7 +157,7 @@ public abstract class EntitySkeletonAbstract extends EntityMonster implements IR
@ -19,7 +19,7 @@ index e575d3cff..85157e80d 100644
event.getProjectile().remove();
return;
diff --git a/src/main/java/net/minecraft/server/ItemBow.java b/src/main/java/net/minecraft/server/ItemBow.java
index 50b815dc8..4ec02c8ce 100644
index 50b815dc89..4ec02c8ce7 100644
--- a/src/main/java/net/minecraft/server/ItemBow.java
+++ b/src/main/java/net/minecraft/server/ItemBow.java
@@ -36,6 +36,7 @@ public class ItemBow extends ItemProjectileWeapon {
@ -59,7 +59,7 @@ index 50b815dc8..4ec02c8ce 100644
if (itemstack1.isEmpty()) {
entityhuman.inventory.f(itemstack1);
diff --git a/src/main/java/net/minecraft/server/ItemCrossbow.java b/src/main/java/net/minecraft/server/ItemCrossbow.java
index 670b0b33a..5d58d5e35 100644
index 670b0b33ae..5d58d5e356 100644
--- a/src/main/java/net/minecraft/server/ItemCrossbow.java
+++ b/src/main/java/net/minecraft/server/ItemCrossbow.java
@@ -220,7 +220,7 @@ public class ItemCrossbow extends ItemProjectileWeapon {
@ -72,10 +72,10 @@ index 670b0b33a..5d58d5e35 100644
event.getProjectile().remove();
return;
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 4e84f4373..ef62edec4 100644
index 12d4300437..47338c692a 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -49,6 +49,7 @@ import net.minecraft.server.GeneratorAccess;
@@ -50,6 +50,7 @@ import net.minecraft.server.GeneratorAccess;
import net.minecraft.server.IBlockData;
import net.minecraft.server.IChatBaseComponent;
import net.minecraft.server.IInventory;
@ -83,7 +83,7 @@ index 4e84f4373..ef62edec4 100644
import net.minecraft.server.ItemActionContext;
import net.minecraft.server.ItemStack;
import net.minecraft.server.Items;
@@ -453,16 +454,16 @@ public class CraftEventFactory {
@@ -457,16 +458,16 @@ public class CraftEventFactory {
/**
* EntityShootBowEvent
*/

View File

@ -1,4 +1,4 @@
From fb58f2953744c93f4c74193e543b562fb27add66 Mon Sep 17 00:00:00 2001
From 65879f50a5f3b1d8f528fb0df747299878c9ad97 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 3 Jul 2018 21:56:23 -0400
Subject: [PATCH] InventoryCloseEvent Reason API
@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers
to "confirm" things based on if it was player triggered close or not.
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index f5dac5082..d1a7a873b 100644
index f5dac50826..d1a7a873b9 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -149,7 +149,7 @@ public abstract class EntityHuman extends EntityLiving {
@ -34,7 +34,7 @@ index f5dac5082..d1a7a873b 100644
this.activeContainer = this.defaultContainer;
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index c3026530d..0a575456a 100644
index c3026530d2..0a575456a1 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -360,7 +360,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -88,7 +88,7 @@ index c3026530d..0a575456a 100644
this.m();
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 8be09b1d0..0385eced6 100644
index 8be09b1d03..0385eced64 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2050,7 +2050,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@ -101,7 +101,7 @@ index 8be09b1d0..0385eced6 100644
this.player.m();
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 5ac4a7c28..006f7b8b9 100644
index 5ac4a7c284..006f7b8b9f 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -402,7 +402,7 @@ public abstract class PlayerList {
@ -114,7 +114,7 @@ index 5ac4a7c28..006f7b8b9 100644
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game");
cserver.getPluginManager().callEvent(playerQuitEvent);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 8bc0a8cca..067379252 100644
index 8bc0a8cca8..067379252d 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -981,7 +981,7 @@ public class WorldServer extends World {
@ -136,7 +136,7 @@ index 8bc0a8cca..067379252 100644
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index 60f839056..948eef868 100644
index 60f839056b..948eef8689 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -614,8 +614,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@ -155,7 +155,7 @@ index 60f839056..948eef868 100644
@Override
public boolean isBlocking() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index be7c5d174..ba60ece45 100644
index be7c5d1747..ba60ece457 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -771,7 +771,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -168,10 +168,10 @@ index be7c5d174..ba60ece45 100644
// Check if the fromWorld and toWorld are the same.
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index ef62edec4..dc83a90a4 100644
index 47338c692a..309cbd0dc6 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1241,8 +1241,19 @@ public class CraftEventFactory {
@@ -1255,8 +1255,19 @@ public class CraftEventFactory {
return event;
}

View File

@ -1,11 +1,11 @@
From 103d45933aaf1353eddf3f3e984c2afaba1402df Mon Sep 17 00:00:00 2001
From 5fb4cc4d83df1236d12cbbacbabd01eed3a62d2d Mon Sep 17 00:00:00 2001
From: Hugo Manrique <hugmanrique@gmail.com>
Date: Mon, 23 Jul 2018 14:22:26 +0200
Subject: [PATCH] Vanished players don't have rights
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 41559d3ba..7f6e20e4b 100644
index 41559d3baf..7f6e20e4b9 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -97,7 +97,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -18,7 +18,7 @@ index 41559d3ba..7f6e20e4b 100644
protected int j;
private Entity vehicle;
diff --git a/src/main/java/net/minecraft/server/IEntityAccess.java b/src/main/java/net/minecraft/server/IEntityAccess.java
index ee22bb038..e5a013ffd 100644
index ee22bb0387..e5a013ffd2 100644
--- a/src/main/java/net/minecraft/server/IEntityAccess.java
+++ b/src/main/java/net/minecraft/server/IEntityAccess.java
@@ -22,9 +22,18 @@ public interface IEntityAccess {
@ -41,7 +41,7 @@ index ee22bb038..e5a013ffd 100644
return VoxelShapes.c(voxelshape, VoxelShapes.a(entity1.getBoundingBox()), OperatorBoolean.AND);
});
diff --git a/src/main/java/net/minecraft/server/IWorldReader.java b/src/main/java/net/minecraft/server/IWorldReader.java
index 17dac8dfa..5b422eaa2 100644
index 17dac8dfa4..5b422eaa2d 100644
--- a/src/main/java/net/minecraft/server/IWorldReader.java
+++ b/src/main/java/net/minecraft/server/IWorldReader.java
@@ -84,7 +84,12 @@ public interface IWorldReader extends IIBlockAccess {
@ -58,7 +58,7 @@ index 17dac8dfa..5b422eaa2 100644
return voxelshape.isEmpty() || this.a((Entity) null, voxelshape.a((double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ()));
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java
index 59b1e6ce2..b90cc6652 100644
index 59b1e6ce2e..b90cc6652b 100644
--- a/src/main/java/net/minecraft/server/ItemBlock.java
+++ b/src/main/java/net/minecraft/server/ItemBlock.java
@@ -126,7 +126,8 @@ public class ItemBlock extends Item {
@ -72,10 +72,10 @@ index 59b1e6ce2..b90cc6652 100644
BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(blockactioncontext.getWorld(), blockactioncontext.getClickPosition()), player, CraftBlockData.fromData(iblockdata), defaultReturn);
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index dc83a90a4..063ad48ce 100644
index 309cbd0dc6..78baaf6253 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1122,6 +1122,14 @@ public class CraftEventFactory {
@@ -1136,6 +1136,14 @@ public class CraftEventFactory {
Projectile projectile = (Projectile) entity.getBukkitEntity();
org.bukkit.entity.Entity collided = position.getEntity().getBukkitEntity();
com.destroystokyo.paper.event.entity.ProjectileCollideEvent event = new com.destroystokyo.paper.event.entity.ProjectileCollideEvent(projectile, collided);

View File

@ -1,11 +1,11 @@
From 0e002c1216bfe64d5191ea106bd1c03d716ace95 Mon Sep 17 00:00:00 2001
From 170f96ced5ac8e6de154574d7815b300cad56b84 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Thu, 2 Aug 2018 08:44:35 -0500
Subject: [PATCH] Add hand to bucket events
diff --git a/src/main/java/net/minecraft/server/EntityCow.java b/src/main/java/net/minecraft/server/EntityCow.java
index a17738f9f..d2c2e3cc3 100644
index a17738f9ff..d2c2e3cc33 100644
--- a/src/main/java/net/minecraft/server/EntityCow.java
+++ b/src/main/java/net/minecraft/server/EntityCow.java
@@ -62,7 +62,7 @@ public class EntityCow extends EntityAnimal {
@ -18,7 +18,7 @@ index a17738f9f..d2c2e3cc3 100644
if (event.isCancelled()) {
return false;
diff --git a/src/main/java/net/minecraft/server/ItemBucket.java b/src/main/java/net/minecraft/server/ItemBucket.java
index cb2891411..5dc967f8b 100644
index cb28914118..5dc967f8ba 100644
--- a/src/main/java/net/minecraft/server/ItemBucket.java
+++ b/src/main/java/net/minecraft/server/ItemBucket.java
@@ -39,7 +39,7 @@ public class ItemBucket extends Item {
@ -67,10 +67,10 @@ index cb2891411..5dc967f8b 100644
((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, blockposition)); // SPIGOT-4238: needed when looking through entity
((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 063ad48ce..8aeba7ca9 100644
index 78baaf6253..eec3effef7 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -356,6 +356,20 @@ public class CraftEventFactory {
@@ -360,6 +360,20 @@ public class CraftEventFactory {
}
private static PlayerEvent getPlayerBucketEvent(boolean isFilling, EntityHuman who, int clickedX, int clickedY, int clickedZ, EnumDirection clickedFace, ItemStack itemstack, net.minecraft.server.Item item) {
@ -91,7 +91,7 @@ index 063ad48ce..8aeba7ca9 100644
Player player = (who == null) ? null : (Player) who.getBukkitEntity();
CraftItemStack itemInHand = CraftItemStack.asNewCraftStack(item);
Material bucket = CraftMagicNumbers.getMaterial(itemstack.getItem());
@@ -368,10 +382,10 @@ public class CraftEventFactory {
@@ -372,10 +386,10 @@ public class CraftEventFactory {
PlayerEvent event = null;
if (isFilling) {

View File

@ -1,4 +1,4 @@
From 12b939a208dedab6e06e0aeb30c0462f1da4cc36 Mon Sep 17 00:00:00 2001
From 24bbe46d46609ba5c6c25a071d391fc41b689a2f Mon Sep 17 00:00:00 2001
From: Phoenix616 <mail@moep.tv>
Date: Tue, 21 Aug 2018 01:39:35 +0100
Subject: [PATCH] Improve death events
@ -15,7 +15,7 @@ items and experience which is otherwise only properly possible by using
internal code.
diff --git a/src/main/java/net/minecraft/server/CombatTracker.java b/src/main/java/net/minecraft/server/CombatTracker.java
index 20db76abd..a148cd437 100644
index 20db76abd7..a148cd437c 100644
--- a/src/main/java/net/minecraft/server/CombatTracker.java
+++ b/src/main/java/net/minecraft/server/CombatTracker.java
@@ -175,6 +175,7 @@ public class CombatTracker {
@ -27,7 +27,7 @@ index 20db76abd..a148cd437 100644
int i = this.f ? 300 : 100;
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 69087c7ef..efda90f6e 100644
index 69087c7ef9..efda90f6e3 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1467,6 +1467,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -47,7 +47,7 @@ index 69087c7ef..efda90f6e 100644
protected void i(double d0, double d1, double d2) {
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
index 480298a02..26302c36e 100644
index 480298a02a..26302c36e9 100644
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
@@ -676,7 +676,8 @@ public class EntityArmorStand extends EntityLiving {
@ -61,7 +61,7 @@ index 480298a02..26302c36e 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityFox.java b/src/main/java/net/minecraft/server/EntityFox.java
index c7a744355..2f4657596 100644
index c7a744355a..2f4657596c 100644
--- a/src/main/java/net/minecraft/server/EntityFox.java
+++ b/src/main/java/net/minecraft/server/EntityFox.java
@@ -597,15 +597,25 @@ public class EntityFox extends EntityAnimal {
@ -94,7 +94,7 @@ index c7a744355..2f4657596 100644
public static boolean a(EntityFox entityfox, EntityLiving entityliving) {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index b9fc57eae..76aba7ea5 100644
index b9fc57eae0..76aba7ea5b 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -85,7 +85,7 @@ public abstract class EntityLiving extends Entity {
@ -249,7 +249,7 @@ index b9fc57eae..76aba7ea5 100644
return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F;
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 0a575456a..251166c4f 100644
index 0a575456a1..251166c4fe 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -75,6 +75,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -300,7 +300,7 @@ index 0a575456a..251166c4f 100644
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
index 73cb64e09..9f317ff2e 100644
index 73cb64e09d..9f317ff2e8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
@@ -806,6 +806,22 @@ public enum CraftSound {
@ -327,7 +327,7 @@ index 73cb64e09..9f317ff2e 100644
this.minecraftKey = minecraftKey;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0386452a8..deacc2187 100644
index 0386452a8d..deacc21873 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1712,7 +1712,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -348,10 +348,10 @@ index 0386452a8..deacc2187 100644
public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 8aeba7ca9..ee3251716 100644
index eec3effef7..0d66765591 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -722,9 +722,16 @@ public class CraftEventFactory {
@@ -736,9 +736,16 @@ public class CraftEventFactory {
public static EntityDeathEvent callEntityDeathEvent(EntityLiving victim, List<org.bukkit.inventory.ItemStack> drops) {
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward());
@ -368,7 +368,7 @@ index 8aeba7ca9..ee3251716 100644
victim.expToDrop = event.getDroppedExp();
for (org.bukkit.inventory.ItemStack stack : event.getDrops()) {
@@ -740,8 +747,15 @@ public class CraftEventFactory {
@@ -754,8 +761,15 @@ public class CraftEventFactory {
CraftPlayer entity = victim.getBukkitEntity();
PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage);
event.setKeepInventory(keepInventory);
@ -384,7 +384,7 @@ index 8aeba7ca9..ee3251716 100644
victim.keepLevel = event.getKeepLevel();
victim.newLevel = event.getNewLevel();
@@ -762,6 +776,31 @@ public class CraftEventFactory {
@@ -776,6 +790,31 @@ public class CraftEventFactory {
return event;
}

@ -1 +1 @@
Subproject commit 142bdd6a358f7134ce543bab2ed22f69db581946
Subproject commit e041de28f57065576cda440667165070c127c71e

@ -1 +1 @@
Subproject commit 17da34209f70fcd4f43d588f39e250c09f9581b2
Subproject commit fcb9f90bf320b4b74192d4e37ab1554cc286f4d5