Confirmedusers
1
edit
(→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 | public void OnTick(float par) | ||
{ | { | ||
Line 100: | Line 100: | ||
} | } | ||
public override void | public override void FromTreeAttributes(ITreeAttribute tree, IWorldAccessor worldForResolving) | ||
{ | { | ||
base. | 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] |