mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 06:25:15 +01:00
Remove unnecessary AT
This commit is contained in:
parent
4d87302672
commit
f8f230a0d0
4 changed files with 7 additions and 10 deletions
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue