Mods / Easy Fruit Trees

Category: #Cheat #Food #QoL #Tweak #Utility #Worldgen
Author: Aureus_Prime
Side: Both
Created: Jan 17th 2022 at 6:37 PM
Last modified: Jan 18th 2022 at 1:49 PM
Downloads: 1691
Follow Unfollow 25

Latest file for v1.16.0:
EasyFruitTrees 1.0.1.zip 1-click install


Makes Cuttlings always survive and grafting never fail.

Version For Game version Downloads Release date Changelog Download 1-click mod install*
v1.0.1 1333 Jan 18th 2022 at 1:49 PM Show EasyFruitTrees 1.0.1.zip Install now
v1.0.0 358 Jan 17th 2022 at 6:39 PM Show EasyFruitTrees.zip Install now

3 Comments (oldest first | newest first)

💬 Aureus_PrimeAuthor, Jan 18th 2022 at 1:52 PM

Taska  I implemented your fix and it worked so i uploaded a new file and credited you for your help Thank you much appreciated.

💬 Taska, Jan 18th 2022 at 6:42 AM

Harmony isn't necessary to do this. Even in code mods that'd be overkill. Instead, for a code mod, you're able to create your own custom class that inherits Block and assign it in your JSON file as 'class: "CustomClass"'. From there, it's as simple as overriding the GetHeldItem and GetPlacedBlockInfo functions and appending whatever strings you want to the StringBuilder dsc parameter provided.

That being said, Easy Fruit Trees seems like a content mod. Code won't work for for it, but thankfully easier method.

Aureus_Prime All you've gotta do is create a lang folder in the same place where you have your patches folder. Create an 'en.json' file. Copy and paste this into it, and it'll change the description in game for you:

{

"blockdesc-fruittree-cutting": "I'm a tree cutting, wheeee!",

}

💬 KenigVovan, Jan 18th 2022 at 6:03 AM

You can use harmony on Vintagestory.API.Common.CollectibleObject "GetHeldItemInfo" for item in inventory and

Vintagestory.API.Common.Block "GetPlacedBlockInfo" for placed block HUD. (Postfix for example and change returned string in Block and change StringBuilder

in CollectibleObject. And check if it is really cutting ofc.

Maybe somebody knows a better solution.

(edit comment delete)