Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
SPIGOT-3033: Alter behaviour of cancelled hopper transfers (reverted from commit 334aa07e2f
)
Dieser Commit ist enthalten in:
Ursprung
dbf4ecf30f
Commit
16b5116c7c
@ -56,7 +56,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void F_() {
|
public void F_() {
|
||||||
@@ -163,10 +197,34 @@
|
@@ -163,10 +197,35 @@
|
||||||
for (int i = 0; i < this.getSize(); ++i) {
|
for (int i = 0; i < this.getSize(); ++i) {
|
||||||
if (!this.getItem(i).isEmpty()) {
|
if (!this.getItem(i).isEmpty()) {
|
||||||
ItemStack itemstack = this.getItem(i).cloneItemStack();
|
ItemStack itemstack = this.getItem(i).cloneItemStack();
|
||||||
@ -78,7 +78,8 @@
|
|||||||
+ this.getWorld().getServer().getPluginManager().callEvent(event);
|
+ this.getWorld().getServer().getPluginManager().callEvent(event);
|
||||||
+ if (event.isCancelled()) {
|
+ if (event.isCancelled()) {
|
||||||
+ this.setItem(i, itemstack);
|
+ this.setItem(i, itemstack);
|
||||||
+ continue;
|
+ this.setCooldown(8); // Delay hopper checks
|
||||||
|
+ return false;
|
||||||
+ }
|
+ }
|
||||||
+ ItemStack itemstack1 = addItem(this, iinventory, CraftItemStack.asNMSCopy(event.getItem()), enumdirection);
|
+ ItemStack itemstack1 = addItem(this, iinventory, CraftItemStack.asNMSCopy(event.getItem()), enumdirection);
|
||||||
|
|
||||||
@ -93,7 +94,7 @@
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -288,10 +346,41 @@
|
@@ -288,10 +347,41 @@
|
||||||
|
|
||||||
if (!itemstack.isEmpty() && b(iinventory, itemstack, i, enumdirection)) {
|
if (!itemstack.isEmpty() && b(iinventory, itemstack, i, enumdirection)) {
|
||||||
ItemStack itemstack1 = itemstack.cloneItemStack();
|
ItemStack itemstack1 = itemstack.cloneItemStack();
|
||||||
@ -137,7 +138,7 @@
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -307,6 +396,13 @@
|
@@ -307,6 +397,13 @@
|
||||||
if (entityitem == null) {
|
if (entityitem == null) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren