SPIGOT-5311: Add API to get/set item associated with throwable projectiles

By: Lars Dormans <lars.dormans@live.nl>
This commit is contained in:
CraftBukkit/Spigot
2020-02-21 09:53:51 +11:00
parent 38b42f0479
commit 2a55fc03dd
10 changed files with 97 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/EntityFireballFireball.java
+++ b/net/minecraft/server/EntityFireballFireball.java
@@ -18,7 +18,7 @@
@@ -18,14 +18,14 @@
public void b(ItemStack itemstack) {
if (itemstack.getItem() != Items.FIRE_CHARGE || itemstack.hasTag()) {
@@ -9,6 +9,14 @@
itemstack1.setCount(1);
}));
}
}
- protected ItemStack l() {
+ public ItemStack l() { // PAIL protected -> public
return (ItemStack) this.getDataWatcher().get(EntityFireballFireball.f);
}
@@ -50,6 +50,6 @@
super.a(nbttagcompound);
ItemStack itemstack = ItemStack.a(nbttagcompound.getCompound("Item"));