Translations:Modding:Adding Block Behavior/14/en
From Vintage Story Wiki
// Can we place the block there?
if (world.BlockAccessor.GetBlock(pos).IsReplacableBy(block)) { // Remove the block at the current position and place it at the target position world.BlockAccessor.SetBlock(0, blockSel.Position); world.BlockAccessor.SetBlock(block.BlockId, pos); }