geforkt von Mirrors/Paper
[ci skip] Remove extraneous diff added in 1.20.3 update (#10101)
Dieser Commit ist enthalten in:
Ursprung
e9e8abc91d
Commit
60beb05297
@ -237,13 +237,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
|
||||
if (event.isCancelled()) {
|
||||
+ // stack.grow(1); // Paper - shrink below (this was actually missing and should be here, added it commented out just for less confusion)
|
||||
+ // stack.grow(1); // Paper - shrink below (this was actually missing and should be here, added it commented out to be consistent)
|
||||
return stack;
|
||||
}
|
||||
|
||||
+ boolean shrink = true; // Paper
|
||||
if (!event.getItem().equals(craftItem)) {
|
||||
+ shrink = false; // Paper - shrink below (this was actually missing and should be here, added it commented out just for less confusion)
|
||||
+ shrink = false; // Paper - shrink below
|
||||
// Chain to handler for new item
|
||||
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
|
||||
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
|
||||
@ -334,14 +334,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(x, y, z));
|
||||
if (!DispenserBlock.eventFired) {
|
||||
@@ -0,0 +0,0 @@ public interface DispenseItemBehavior {
|
||||
return stack;
|
||||
}
|
||||
|
||||
+ boolean shrink = true; // Paper
|
||||
if (!event.getItem().equals(craftItem)) {
|
||||
// Chain to handler for new item
|
||||
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
|
||||
@@ -0,0 +0,0 @@ public interface DispenseItemBehavior {
|
||||
|
||||
// CraftBukkit start
|
||||
org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos());
|
||||
@ -351,15 +343,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
|
||||
if (!DispenserBlock.eventFired) {
|
||||
@@ -0,0 +0,0 @@ public interface DispenseItemBehavior {
|
||||
return stack;
|
||||
}
|
||||
|
||||
+ boolean shrink = true; // Paper
|
||||
if (!event.getItem().equals(craftItem)) {
|
||||
+ shrink = false; // Paper - shrink below (this was actually missing and should be here, added it commented out just for less confusion)
|
||||
// Chain to handler for new item
|
||||
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
|
||||
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
|
||||
// CraftBukkit start
|
||||
org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos());
|
||||
- CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack);
|
||||
+ CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack); // Paper - ignore stack size on damageable items
|
||||
|
||||
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0));
|
||||
if (!DispenserBlock.eventFired) {
|
||||
@@ -0,0 +0,0 @@ public interface DispenseItemBehavior {
|
||||
BlockPos blockposition = pointer.pos().relative((Direction) pointer.state().getValue(DispenserBlock.FACING));
|
||||
// CraftBukkit start
|
||||
@ -369,14 +360,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0));
|
||||
if (!DispenserBlock.eventFired) {
|
||||
@@ -0,0 +0,0 @@ public interface DispenseItemBehavior {
|
||||
return stack;
|
||||
}
|
||||
|
||||
+ boolean shrink = true; // Paper
|
||||
if (!event.getItem().equals(craftItem)) {
|
||||
// Chain to handler for new item
|
||||
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
|
||||
@@ -0,0 +0,0 @@ public interface DispenseItemBehavior {
|
||||
// CraftBukkit start
|
||||
// EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(worldserver, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, (EntityLiving) null);
|
||||
@ -421,18 +404,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
|
||||
if (!DispenserBlock.eventFired) {
|
||||
@@ -0,0 +0,0 @@ public interface DispenseItemBehavior {
|
||||
}
|
||||
|
||||
if (event.isCancelled()) {
|
||||
+ // stack.grow(1); // Paper - shrink below (this was actually missing and should be here, added it commented out just for less confusion)
|
||||
return stack;
|
||||
}
|
||||
|
||||
+ boolean shrink = true; // Paper
|
||||
if (!event.getItem().equals(craftItem)) {
|
||||
// Chain to handler for new item
|
||||
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
|
||||
@@ -0,0 +0,0 @@ public interface DispenseItemBehavior {
|
||||
|
||||
// CraftBukkit start
|
||||
org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos());
|
||||
@ -442,14 +413,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
|
||||
if (!DispenserBlock.eventFired) {
|
||||
@@ -0,0 +0,0 @@ public interface DispenseItemBehavior {
|
||||
return stack;
|
||||
}
|
||||
|
||||
+ boolean shrink = true; // Paper
|
||||
if (!event.getItem().equals(craftItem)) {
|
||||
// Chain to handler for new item
|
||||
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
|
||||
@@ -0,0 +0,0 @@ public interface DispenseItemBehavior {
|
||||
|
||||
// CraftBukkit start
|
||||
org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos());
|
||||
@ -458,14 +421,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
|
||||
if (!DispenserBlock.eventFired) {
|
||||
@@ -0,0 +0,0 @@ public interface DispenseItemBehavior {
|
||||
return stack;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java
|
||||
+++ b/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java
|
||||
@@ -0,0 +0,0 @@ public class ShearsDispenseItemBehavior extends OptionalDispenseItemBehavior {
|
||||
ServerLevel worldserver = pointer.level();
|
||||
// CraftBukkit start
|
||||
org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos());
|
||||
- CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack);
|
||||
+ CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack); // Paper - ignore stack size on damageable items
|
||||
|
||||
+ boolean shrink = true; // Paper
|
||||
if (!event.getItem().equals(craftItem)) {
|
||||
// Chain to handler for new item
|
||||
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
|
||||
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0));
|
||||
if (!DispenserBlock.eventFired) {
|
||||
diff --git a/src/main/java/net/minecraft/core/dispenser/ShulkerBoxDispenseBehavior.java b/src/main/java/net/minecraft/core/dispenser/ShulkerBoxDispenseBehavior.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/core/dispenser/ShulkerBoxDispenseBehavior.java
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren