mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-13 11:18:23 +01:00
[Bleeding] Fix incorrect Cocoa Bean orientation. Addresses BUKKIT-5182
When ItemDye is used to place a Cocoa Block, the postPlace() method should not be called, as data is handled within the ItemDye class. However, if Cocoa is placed via its block item, postPlace() should still be called to mirror vanilla behavior.
This commit is contained in:
parent
9a6d035998
commit
0e809d8318
2 changed files with 6 additions and 1 deletions
|
@ -103,6 +103,11 @@ public class ItemBlock extends Item {
|
|||
|
||||
world.update(x, y, z, block);
|
||||
|
||||
// Cocoa beans placed via ItemDye do not need the rest of the processing
|
||||
if (block == Blocks.COCOA && itemstack != null && itemstack.getItem() instanceof ItemDye) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Skulls don't get block data applied to them
|
||||
if (block != null && block != Blocks.SKULL) {
|
||||
block.postPlace(world, x, y, z, entityhuman, itemstack);
|
||||
|
|
|
@ -70,7 +70,7 @@ public class ItemDye extends Item {
|
|||
|
||||
// CraftBukkit start
|
||||
// world.setTypeAndData(i, j, k, Blocks.COCOA, j1, 2);
|
||||
if (!ItemBlock.processBlockPlace(world, entityhuman, null, i, j, k, Blocks.COCOA, j1, clickedX, clickedY, clickedZ)) {
|
||||
if (!ItemBlock.processBlockPlace(world, entityhuman, itemstack, i, j, k, Blocks.COCOA, j1, clickedX, clickedY, clickedZ)) {
|
||||
return false;
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
|
Loading…
Add table
Reference in a new issue