Fix item placement

This commit is contained in:
md_5 2024-04-25 18:18:59 +10:00
parent 661afb43c3
commit 90f1059bae
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -144,7 +144,7 @@
+
+ if (!fertilizeEvent.isCancelled()) {
+ // Change the stack to its new contents if it hasn't been tampered with.
+ if (this.getCount() == oldCount && Objects.equals(this.components, oldData)) {
+ if (this.getCount() == oldCount && Objects.equals(this.components.asPatch(), oldData)) {
+ this.restorePatch(newData);
+ this.setCount(newCount);
+ }
@ -191,7 +191,7 @@
+ ItemSign.openSign = null; // SPIGOT-6758 - Reset on early return
+ } else {
+ // Change the stack to its new contents if it hasn't been tampered with.
+ if (this.getCount() == oldCount && Objects.equals(this.components, oldData)) {
+ if (this.getCount() == oldCount && Objects.equals(this.components.asPatch(), oldData)) {
+ this.restorePatch(newData);
+ this.setCount(newCount);
+ }