Modding:Block Entity: Difference between revisions

From Vintage Story Wiki
→‎The BlockEntity: Fixed typo (FromTreeAtributes -> FromTreeAttributes) and added missing parameter
(→‎The BlockEntity: Fixed typo (FromTreeAtributes -> FromTreeAttributes) and added missing parameter)
(3 intermediate revisions by one other user not shown)
Line 50: Line 50:


<syntaxhighlight lang="c#">
<syntaxhighlight lang="c#">
         public void onTick(float par)
         public void OnTick(float par)
         {
         {
          
          
Line 100: Line 100:
         }
         }


         public override void FromTreeAtributes(ITreeAttribute tree)
         public override void FromTreeAttributes(ITreeAttribute tree, IWorldAccessor worldForResolving)
         {
         {
             base.FromTreeAtributes(tree);
             base.FromTreeAttributes(tree, worldForResolving);
             timer = tree.GetInt("timer");
             timer = tree.GetInt("timer");
         }
         }
</syntaxhighlight>
</syntaxhighlight>


Line 135: Line 136:


= Mod Download =
= Mod Download =
 
* for VS 1.12 (Source only): [https://github.com/anegostudios/vsmodexamples/tree/ac7eeaed597b8a25dcfc2366b9c51cd92850d2b9/Mods/Ticking GitHub]
* for VS 1.9: [https://wiki.vintagestory.at/images/8/80/Ticking_v1.0.0.zip Ticking_v1.0.0.zip]
* for VS 1.9: [https://wiki.vintagestory.at/images/8/80/Ticking_v1.0.0.zip Ticking_v1.0.0.zip]
* for VS 1.6: [https://wiki.vintagestory.at/images/6/65/Ticking.zip Ticking.zip]
* for VS 1.6: [https://wiki.vintagestory.at/images/6/65/Ticking.zip Ticking.zip]
Confirmedusers
1

edit