aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server')
-rw-r--r--patches/server/0936-Fix-possible-StackOverflowError-and-NPE-for-some-dis.patch8
-rw-r--r--patches/server/0940-Properly-track-the-changed-item-from-dispense-events.patch2
2 files changed, 5 insertions, 5 deletions
diff --git a/patches/server/0936-Fix-possible-StackOverflowError-and-NPE-for-some-dis.patch b/patches/server/0936-Fix-possible-StackOverflowError-and-NPE-for-some-dis.patch
index 2070223780..25ace4aa41 100644
--- a/patches/server/0936-Fix-possible-StackOverflowError-and-NPE-for-some-dis.patch
+++ b/patches/server/0936-Fix-possible-StackOverflowError-and-NPE-for-some-dis.patch
@@ -45,7 +45,7 @@ index 39c96f5db6e90a470404c6387fa0c1d5531822e5..8aae1d113e84dfad9f2b6f0bcd203ca6
idispensebehavior.dispense(sourceblock, eventStack);
} else {
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
-index 18304349c9ab24657c4152aff800dba969174665..94b2647f69035dce9a3d56b6978e3884e06c5583 100644
+index 18304349c9ab24657c4152aff800dba969174665..681c38f4457fc10806c10518b16159580c0f2619 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -124,7 +124,7 @@ public interface DispenseItemBehavior {
@@ -73,7 +73,7 @@ index 18304349c9ab24657c4152aff800dba969174665..94b2647f69035dce9a3d56b6978e3884
- DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
- if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != EquipmentDispenseItemBehavior.INSTANCE) {
+ DispenseItemBehavior idispensebehavior = DispenserBlock.getDispenseBehavior(pointer, eventStack); // Paper - Fix NPE with equippable and items without behavior
-+ if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != EquipmentDispenseItemBehavior.INSTANCE && idispensebehavior != this) { // Paper - fix possible StackOverflowError
++ if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) { // Paper - fix possible StackOverflowError
idispensebehavior.dispense(pointer, eventStack);
return stack;
}
@@ -84,7 +84,7 @@ index 18304349c9ab24657c4152aff800dba969174665..94b2647f69035dce9a3d56b6978e3884
- DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
- if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != EquipmentDispenseItemBehavior.INSTANCE) {
+ DispenseItemBehavior idispensebehavior = DispenserBlock.getDispenseBehavior(pointer, eventStack); // Paper - Fix NPE with equippable and items without behavior
-+ if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != EquipmentDispenseItemBehavior.INSTANCE && idispensebehavior != this) { // Paper - fix possible StackOverflowError
++ if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) { // Paper - fix possible StackOverflowError
idispensebehavior.dispense(pointer, eventStack);
return stack;
}
@@ -185,7 +185,7 @@ index 18304349c9ab24657c4152aff800dba969174665..94b2647f69035dce9a3d56b6978e3884
- DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
- if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != EquipmentDispenseItemBehavior.INSTANCE) {
+ DispenseItemBehavior idispensebehavior = DispenserBlock.getDispenseBehavior(pointer, eventStack); // Paper - Fix NPE with equippable and items without behavior
-+ if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != EquipmentDispenseItemBehavior.INSTANCE && idispensebehavior != this) { // Paper - fix possible StackOverflowError
++ if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) { // Paper - fix possible StackOverflowError
idispensebehavior.dispense(pointer, eventStack);
return stack;
}
diff --git a/patches/server/0940-Properly-track-the-changed-item-from-dispense-events.patch b/patches/server/0940-Properly-track-the-changed-item-from-dispense-events.patch
index d653a24df5..872400fdee 100644
--- a/patches/server/0940-Properly-track-the-changed-item-from-dispense-events.patch
+++ b/patches/server/0940-Properly-track-the-changed-item-from-dispense-events.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Properly track the changed item from dispense events
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
-index 94b2647f69035dce9a3d56b6978e3884e06c5583..a09b089565f9167e1a2d53116ae879d9f868342e 100644
+index 681c38f4457fc10806c10518b16159580c0f2619..8f9b86e50717746e55232293d9e5ac05b8616aa0 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -129,10 +129,14 @@ public interface DispenseItemBehavior {