13
0
geforkt von Mirrors/Paper

Half-step placement bug fix, all credits to Brettflan

Dieser Commit ist enthalten in:
VictorD 2011-02-03 22:34:22 +01:00
Ursprung 3a19f9e429
Commit 059d23b4c9

Datei anzeigen

@ -68,7 +68,12 @@ public class ItemBlock extends Item {
/* We store the old data so we can undo it. Snow(78) and half-steps(44) are special in that they replace the block itself,
* rather than the block touching the face we clicked on.
*/
org.bukkit.block.Block replacedBlock = ( blockClicked.getTypeId() == Block.SNOW.id || (blockClicked.getTypeId() == Block.STEP.id && itemstack.id == Block.STEP.id && faceClicked == BlockFace.UP) ) ? blockClicked : blockClicked.getFace(faceClicked);
int typeId = blockClicked.getTypeId();
org.bukkit.block.Block replacedBlock = blockClicked.getFace(faceClicked);
if (typeId == Block.SNOW.id || (typeId == Block.STEP.id && itemstack.id == Block.STEP.id && faceClicked == BlockFace.UP))
replacedBlock = blockClicked;
final BlockState replacedBlockState = new CraftBlockState(replacedBlock);
// CraftBukkit end