Translations:Modding:Adding Block Behavior/14/ru

From Vintage Story Wiki
Revision as of 12:36, 14 May 2020 by Akellagray (talk | contribs) (Created page with "// Можем ли мы разместить блок там? if (world.BlockAccessor.GetBlock(pos).IsReplacableBy(block)) { // Remove the block at the cur...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

// Можем ли мы разместить блок там? 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);
       }