mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 11:27:35 +01:00
Remove extra shrink in ProjectileDispenseBehavior
This commit is contained in:
parent
da1947b2ad
commit
a67d7adcc9
@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/core/dispenser/ProjectileDispenseBehavior.java
|
||||
+++ b/net/minecraft/core/dispenser/ProjectileDispenseBehavior.java
|
||||
@@ -27,16 +_,39 @@
|
||||
@@ -27,17 +_,39 @@
|
||||
ServerLevel serverLevel = blockSource.level();
|
||||
Direction direction = blockSource.state().getValue(DispenserBlock.FACING);
|
||||
Position dispensePosition = this.dispenseConfig.positionFunction().getDispensePosition(blockSource, direction);
|
||||
@ -14,6 +14,7 @@
|
||||
- this.dispenseConfig.power(),
|
||||
- this.dispenseConfig.uncertainty()
|
||||
- );
|
||||
- item.shrink(1);
|
||||
+ ItemStack itemstack1 = item.copyWithCount(1); // Paper - shrink below and single item in event
|
||||
+ org.bukkit.block.Block block = org.bukkit.craftbukkit.block.CraftBlock.at(serverLevel, blockSource.pos());
|
||||
+ org.bukkit.craftbukkit.inventory.CraftItemStack craftItem = org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack1);
|
||||
@ -47,6 +48,6 @@
|
||||
+ }
|
||||
+ if (shrink) item.shrink(1); // Paper - actually handle here
|
||||
+ // CraftBukkit end
|
||||
item.shrink(1);
|
||||
return item;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user