3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-23 23:00:08 +01:00
Paper/nms-patches/EntityProjectileThrowable.patch

27 Zeilen
1.0 KiB
Diff

--- a/net/minecraft/server/EntityProjectileThrowable.java
+++ b/net/minecraft/server/EntityProjectileThrowable.java
@@ -18,8 +18,8 @@
public void setItem(ItemStack itemstack) {
2020-06-25 02:00:00 +02:00
if (itemstack.getItem() != this.getDefaultItem() || itemstack.hasTag()) {
- this.getDataWatcher().set(EntityProjectileThrowable.b, SystemUtils.a((Object) itemstack.cloneItemStack(), (itemstack1) -> {
- itemstack1.setCount(1);
2020-06-25 02:00:00 +02:00
+ this.getDataWatcher().set(EntityProjectileThrowable.b, SystemUtils.a(itemstack.cloneItemStack(), (itemstack1) -> { // CraftBukkit - decompile error
+ if (!itemstack1.isEmpty()) itemstack1.setCount(1); // CraftBukkit
}));
}
2020-06-25 02:00:00 +02:00
@@ -27,6 +27,12 @@
2020-06-25 02:00:00 +02:00
protected abstract Item getDefaultItem();
+ // CraftBukkit start
2020-06-25 02:00:00 +02:00
+ public Item getDefaultItemPublic() {
+ return getDefaultItem();
+ }
+ // CraftBukkit end
+
2020-06-25 02:00:00 +02:00
public ItemStack getItem() {
return (ItemStack) this.getDataWatcher().get(EntityProjectileThrowable.b);
}