Modding:WorldGen API: Difference between revisions

From Vintage Story Wiki
Line 415: Line 415:
A few things could be done to improve this code and it's left as an exercise for the reader. Doing this will help you get familiar with the API without overwhelming you.
A few things could be done to improve this code and it's left as an exercise for the reader. Doing this will help you get familiar with the API without overwhelming you.
<ul>
<ul>
<li>Currently the code will place chests over water or air. Change TryGetChestLocation to only place chests over solid blocks.</li>
<li>Currently the code will place chests over water or air. Change '''TryGetChestLocation''' to only place chests over solid blocks.</li>
<li>Make the chest face away from the tree log(and player) correctly. Currently it always faces south. Hint: use chest-north, chest-east, chest-west.</li>
<li>Make the chest face away from the tree log(and player) correctly. Currently it always faces south. Hint: use chest-north, chest-east, chest-west.</li>
<li>Make chests a more rare item to find.</li>
<li>Make chests a more rare item to find.</li>
256

edits