Modding:Adding Block Behavior: Difference between revisions

From Vintage Story Wiki
Add a link to Modding:Behavior_Traversal
m (Double checked information and updated version)
(Add a link to Modding:Behavior_Traversal)
Line 44: Line 44:


<!--T:12-->
<!--T:12-->
# Calculate the new position of the block depending on the face the player is looking at
# Calculate the new position to move the block to, based on the block face the player is looking at.
# Check if the block can be placed at this position
# Check if the block can be placed at this new position.
# Remove the original block
# Remove the block at the old position.
# Place the new block using the previously calculated position
# Place the same type of block at the new position.
# [[Modding:Behavior_Traversal|Skip]] the default logic that would otherwise place whatever item is held at the old position.


<!--T:13-->
<!--T:13-->
Confirmedusers
261

edits