Aliase replace

Post Reply
owlondrugs
Member
Posts: 35
Joined: Sun Jul 23, 2017 12:53
In-game: Owlondrugs

Aliase replace

by owlondrugs » Post

I can't replace the dirt with another block. I also can't replace a block with grass with any other. Help

User avatar
AspireMint
Member
Posts: 415
Joined: Mon Jul 09, 2012 12:59
GitHub: AspireMint
IRC: AspireMint
In-game: AspireMint
Location: Stuck at spawn

Re: Aliase replace

by AspireMint » Post

If you are using minetest.register_alias or minetest.register_alias_force,
do not forget to update depends.txt file. For example, if you want to replace dirt, append default to that file. (because dirt is from default mod)

User avatar
Blockhead
Member
Posts: 1602
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: Aliase replace

by Blockhead » Post

depends.txt is deprecated, please use mod.conf
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

Droog71
Member
Posts: 37
Joined: Sat May 29, 2021 21:09

Re: Aliase replace

by Droog71 » Post

owlondrugs wrote:
Wed Dec 01, 2021 19:26
I can't replace the dirt with another block. I also can't replace a block with grass with any other. Help
Try something like this in your init.lua file.


minetest.register_alias("mapgen_dirt", "my_mod:my_dirt")
minetest.register_alias("mapgen_dirt_with_grass", "my_mod:my_dirt_with_grass")

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 3 guests