mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-16 12:43:52 -07:00
Fix missing data-value when placing a stair-block (somehow gets set after the fact) - Fixes BUKKIT-40
This commit is contained in:
@@ -89,6 +89,11 @@ public class ItemBlock extends Item {
|
|||||||
* replace this with.
|
* replace this with.
|
||||||
*/
|
*/
|
||||||
if (world.setRawTypeIdAndData(i, j, k, this.id, this.filterData(itemstack.getData()))) { // <-- world.setTypeIdAndData does this to place the block
|
if (world.setRawTypeIdAndData(i, j, k, this.id, this.filterData(itemstack.getData()))) { // <-- world.setTypeIdAndData does this to place the block
|
||||||
|
// Make sure the block-rotation already gets set before we call the event
|
||||||
|
if (Block.byId[this.id] instanceof BlockStairs) {
|
||||||
|
Block.byId[this.id].postPlace(world, i, j, k, entityhuman);
|
||||||
|
}
|
||||||
|
|
||||||
BlockPlaceEvent event = CraftEventFactory.callBlockPlaceEvent(world, entityhuman, eventUseBlockBelow ? blockStateBelow : replacedBlockState, clickedX, clickedY, clickedZ, block);
|
BlockPlaceEvent event = CraftEventFactory.callBlockPlaceEvent(world, entityhuman, eventUseBlockBelow ? blockStateBelow : replacedBlockState, clickedX, clickedY, clickedZ, block);
|
||||||
|
|
||||||
if (event.isCancelled() || !event.canBuild()) {
|
if (event.isCancelled() || !event.canBuild()) {
|
||||||
|
Reference in New Issue
Block a user