Modding:Block Entity: Difference between revisions

From Vintage Story Wiki
no edit summary
No edit summary
(3 intermediate revisions by 2 users not shown)
Line 12: Line 12:
</syntaxhighlight>
</syntaxhighlight>


You can download the assets [http://wiki.vintagestory.at/images/d/d4/Ticking_-_No_CS_File.zip here] and place it in your mods directory.
You can download the assets [https://wiki.vintagestory.at/images/d/d4/Ticking_-_No_CS_File.zip here] and place it in your mods directory.


== The BlockEntity ==
== The BlockEntity ==
Line 112: Line 112:
         {
         {
             base.Start(api);
             base.Start(api);
             api.RegisterBlockEntity("tickingcounter", typeof(TickingBlockEntity));
             api.RegisterBlockEntityClass("tickingcounter", typeof(TickingBlockEntity));
         }
         }


Line 126: Line 126:
== Distribution ==
== Distribution ==


There is only one thing left to do and that is to place your *.cs file in the zip archive. Once that is done you can share it with other people. It will work in the same way as ordinary mods, you can install it by copying it into the mods folder.
In order to finish everything, open the modtools and type in <code>pack <your mod id></code>. Now you can take the zip file and share it with other people. It will work in the same way as ordinary mods, you can install it by copying it into the mods folder.


Here is my version: [http://wiki.vintagestory.at/images/6/65/Ticking.zip Ticking.zip]
Here is my version: [https://wiki.vintagestory.at/images/6/65/Ticking.zip Ticking.zip]
 
 
 
{{Navbox/modding|Vintage Story}}
Confirmedusers, editor, Administrators
886

edits