aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server')
-rw-r--r--patches/server/0459-Add-BlockFailedDispenseEvent.patch4
-rw-r--r--patches/server/0473-Add-BlockPreDispenseEvent.patch4
-rw-r--r--patches/server/0936-Fix-possible-StackOverflowError-and-NPE-for-some-dis.patch7
-rw-r--r--patches/server/1017-Fix-InventoryOpenEvent-cancellation.patch2
4 files changed, 7 insertions, 10 deletions
diff --git a/patches/server/0459-Add-BlockFailedDispenseEvent.patch b/patches/server/0459-Add-BlockFailedDispenseEvent.patch
index c0dc74c0fe..ee65c26c99 100644
--- a/patches/server/0459-Add-BlockFailedDispenseEvent.patch
+++ b/patches/server/0459-Add-BlockFailedDispenseEvent.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add BlockFailedDispenseEvent
diff --git a/src/main/java/net/minecraft/world/level/block/DispenserBlock.java b/src/main/java/net/minecraft/world/level/block/DispenserBlock.java
-index 3d05e71fef8fa70df05311a6a9ddad99994892a6..352f5412fc469a1fde6f14ffcaf00e88613b2704 100644
+index f4510b8e14d0b9997907ce1d1368ba3b3b5daf3e..f4853a5ff8a45efcda2d7781c1fa897c47d8ea46 100644
--- a/src/main/java/net/minecraft/world/level/block/DispenserBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/DispenserBlock.java
@@ -98,8 +98,10 @@ public class DispenserBlock extends BaseEntityBlock {
@@ -20,7 +20,7 @@ index 3d05e71fef8fa70df05311a6a9ddad99994892a6..352f5412fc469a1fde6f14ffcaf00e88
ItemStack itemstack = tileentitydispenser.getItem(i);
DispenseItemBehavior idispensebehavior = this.getDispenseMethod(world, itemstack);
diff --git a/src/main/java/net/minecraft/world/level/block/DropperBlock.java b/src/main/java/net/minecraft/world/level/block/DropperBlock.java
-index 09e5ff5a0270cb88f3505a28c07ef816f18ac23b..3e09d4b11c881b9c7d3447df379286238076cfee 100644
+index a08e8571f3a83afc80c2f1758a9029cd28ed6947..91b514967405115f22edf4255775361a672e5c2f 100644
--- a/src/main/java/net/minecraft/world/level/block/DropperBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/DropperBlock.java
@@ -60,6 +60,7 @@ public class DropperBlock extends DispenserBlock {
diff --git a/patches/server/0473-Add-BlockPreDispenseEvent.patch b/patches/server/0473-Add-BlockPreDispenseEvent.patch
index d2ba7470a3..d280bd07f1 100644
--- a/patches/server/0473-Add-BlockPreDispenseEvent.patch
+++ b/patches/server/0473-Add-BlockPreDispenseEvent.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add BlockPreDispenseEvent
diff --git a/src/main/java/net/minecraft/world/level/block/DispenserBlock.java b/src/main/java/net/minecraft/world/level/block/DispenserBlock.java
-index 352f5412fc469a1fde6f14ffcaf00e88613b2704..9f99a9ec8f8269a0aeee2d6aa68f8a344f5f64b6 100644
+index f4853a5ff8a45efcda2d7781c1fa897c47d8ea46..a02f24448b002824b068278fa427003008c0d0f1 100644
--- a/src/main/java/net/minecraft/world/level/block/DispenserBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/DispenserBlock.java
@@ -107,6 +107,7 @@ public class DispenserBlock extends BaseEntityBlock {
@@ -17,7 +17,7 @@ index 352f5412fc469a1fde6f14ffcaf00e88613b2704..9f99a9ec8f8269a0aeee2d6aa68f8a34
tileentitydispenser.setItem(i, idispensebehavior.dispense(sourceblock, itemstack));
}
diff --git a/src/main/java/net/minecraft/world/level/block/DropperBlock.java b/src/main/java/net/minecraft/world/level/block/DropperBlock.java
-index 3e09d4b11c881b9c7d3447df379286238076cfee..1762415720caa722600ab7e81344ee9168e42011 100644
+index 91b514967405115f22edf4255775361a672e5c2f..ddecf443df3679e3098eb54edd19585a0512e342 100644
--- a/src/main/java/net/minecraft/world/level/block/DropperBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/DropperBlock.java
@@ -71,6 +71,7 @@ public class DropperBlock extends DispenserBlock {
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 a4d1c6d91e..2070223780 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
@@ -18,9 +18,6 @@ return value anymore and some dispense behaviors like equippable and
regular items will not have a defined behavior in that map and might throw
a NPE in that case.
-== AT ==
-public net.minecraft.world.level.block.DispenserBlock getDispenseMethod(Lnet/minecraft/world/level/Level;Lnet/minecraft/world/item/ItemStack;)Lnet/minecraft/core/dispenser/DispenseItemBehavior;
-
diff --git a/src/main/java/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java
index 36180e80dbd681e68c60e097015dad890a48b574..dff30954e4c588ee4cc79d3f6dab6fb456934d65 100644
--- a/src/main/java/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java
@@ -278,7 +275,7 @@ index f84987c36a16df19286d6f1badfb1ffb9cc7e770..cc85e96035f7cb2e6493b1cc47480311
idispensebehavior.dispense(pointer, eventStack);
return stack;
diff --git a/src/main/java/net/minecraft/world/level/block/DispenserBlock.java b/src/main/java/net/minecraft/world/level/block/DispenserBlock.java
-index 9f99a9ec8f8269a0aeee2d6aa68f8a344f5f64b6..716d1a98775d7338a121af9fd0868a65e2c28288 100644
+index a02f24448b002824b068278fa427003008c0d0f1..500c56c4ef0878434582a50d6dba2ccca9773275 100644
--- a/src/main/java/net/minecraft/world/level/block/DispenserBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/DispenserBlock.java
@@ -116,6 +116,12 @@ public class DispenserBlock extends BaseEntityBlock {
@@ -291,7 +288,7 @@ index 9f99a9ec8f8269a0aeee2d6aa68f8a344f5f64b6..716d1a98775d7338a121af9fd0868a65
+ }
+ // Paper end - Fix NPE with equippable and items without behavior
+
- public DispenseItemBehavior getDispenseMethod(Level world, ItemStack stack) {
+ protected DispenseItemBehavior getDispenseMethod(Level world, ItemStack stack) {
if (!stack.isItemEnabled(world.enabledFeatures())) {
return DispenserBlock.DEFAULT_BEHAVIOR;
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
diff --git a/patches/server/1017-Fix-InventoryOpenEvent-cancellation.patch b/patches/server/1017-Fix-InventoryOpenEvent-cancellation.patch
index 05ec9a1266..e63b2489a9 100644
--- a/patches/server/1017-Fix-InventoryOpenEvent-cancellation.patch
+++ b/patches/server/1017-Fix-InventoryOpenEvent-cancellation.patch
@@ -183,7 +183,7 @@ index 673a92d383db463b5c4e2ac3a4ecbd7e97c15c6d..6a2123cd808fa79f3cdb1cb56632d29b
return InteractionResult.SUCCESS;
diff --git a/src/main/java/net/minecraft/world/level/block/DispenserBlock.java b/src/main/java/net/minecraft/world/level/block/DispenserBlock.java
-index 716d1a98775d7338a121af9fd0868a65e2c28288..b2243e883388d1c12480e470c391bb97b993b77d 100644
+index 500c56c4ef0878434582a50d6dba2ccca9773275..5a6c153fa2873aecba0d0d02be2cc2a514f445e3 100644
--- a/src/main/java/net/minecraft/world/level/block/DispenserBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/DispenserBlock.java
@@ -80,8 +80,9 @@ public class DispenserBlock extends BaseEntityBlock {