Modding:Adding Block Behavior: Difference between revisions

From Vintage Story Wiki
no edit summary
(Marked this version for translation)
No edit summary
Line 74: Line 74:
         if (world.BlockAccessor.GetBlock(pos).IsReplacableBy(block))
         if (world.BlockAccessor.GetBlock(pos).IsReplacableBy(block))
         {
         {
<translate>
             // Remove the block at the current position and place it at the target position
             // Remove the block at the current position and place it at the target position
</translate>
             world.BlockAccessor.SetBlock(0, blockSel.Position);
             world.BlockAccessor.SetBlock(0, blockSel.Position);
             world.BlockAccessor.SetBlock(block.BlockId, pos);
             world.BlockAccessor.SetBlock(block.BlockId, pos);
Confirmedusers
409

edits