3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-19 13:00:06 +01:00

Fix dispenser removing data from items. Fixes BUKKIT-2045

Dieser Commit ist enthalten in:
feildmaster 2012-08-06 08:49:27 -05:00
Ursprung 7dc47892a4
Commit 59aaa6a80a

Datei anzeigen

@ -106,8 +106,9 @@ public class BlockDispenser extends BlockContainer {
ItemStack itemstack = tileentitydispenser.getItem(i1); ItemStack itemstack = tileentitydispenser.getItem(i1);
// CraftBukkit start // CraftBukkit start
// Copy item stack, because we want it to have 1 item // Clone item stack, then set the count to 1
itemstack = new ItemStack(itemstack.id, 1, itemstack.getData(), itemstack.getEnchantments()); itemstack = itemstack.cloneItemStack();
itemstack.count = 1;
double d3 = random.nextDouble() * 0.1D + 0.2D; double d3 = random.nextDouble() * 0.1D + 0.2D;
double motX = (double) b0 * d3; double motX = (double) b0 * d3;