mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 15:30:19 +01:00
Properly forward DispenseEvent #getItem to saddle
Correctly use the DispenseEvent's #getItem ItemStack when placing the saddle on entities during a dispense behaviour instead of the original stack.
This commit is contained in:
parent
cffcda2bc7
commit
26f246b908
1 changed files with 9 additions and 0 deletions
|
@ -36,6 +36,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
ArmorStand entityarmorstand = (ArmorStand) EntityType.ARMOR_STAND.spawn(worldserver, consumer, blockposition, MobSpawnType.DISPENSER, false, false);
|
||||
|
||||
if (entityarmorstand != null) {
|
||||
@@ -0,0 +0,0 @@ public interface DispenseItemBehavior {
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
- ((Saddleable) list.get(0)).equipSaddle(itemstack1, SoundSource.BLOCKS);
|
||||
+ ((Saddleable) list.get(0)).equipSaddle(CraftItemStack.asNMSCopy(event.getItem()), SoundSource.BLOCKS); // Paper - track changed items in dispense event
|
||||
// CraftBukkit end
|
||||
if (shrink) stack.shrink(1); // Paper - actually handle here
|
||||
this.setSuccess(true);
|
||||
@@ -0,0 +0,0 @@ public interface DispenseItemBehavior {
|
||||
int y = blockposition.getY();
|
||||
int z = blockposition.getZ();
|
||||
|
|
Loading…
Reference in a new issue