Overridding v6 trees?

User avatar
Posts: 825
Joined: Mon Apr 25, 2016 16:09
Location: Maryland, USA
GitHub: Gerold55
IRC: Gerold55
In-game: Gerold55

Overridding v6 trees?

by GamingAssociation39 » Thu Mar 07, 2019 07:56

I was able to add trees for v7 but need to override/replace the trees for v6. Can someone help me figure this out?
Jesus Is Lord and Savior!!!

User avatar
Posts: 3782
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: Overridding v6 trees?

by Wuzzy » Thu Mar 07, 2019 13:07

This is very easy, actually.
In your game, you add a mod that defines mapgen aliases (Ctrl+F “Mapgen aliases” in lua_api.txt). You just define which nodes to use.

Code: Select all
minetest.register_alias("mapgen_tree", "mcl_core:tree")
minetest.register_alias("mapgen_leaves", "mcl_core:leaves")
minetest.register_alias("mapgen_jungletree", "mcl_core:jungletree")
minetest.register_alias("mapgen_jungleleaves", "mcl_core:jungleleaves")
minetest.register_alias("mapgen_pine_tree", "mcl_core:sprucetree")
minetest.register_alias("mapgen_pine_needles", "mcl_core:spruceleaves")
minetest.register_alias("mapgen_apple", "mcl_core:leaves") -- MineClone 2 has no apple node, so we use leaves instead

https://repo.or.cz/MineClone/MineClone2 ... nit.lua#l2
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 3 guests