Renaming and retexturing items/nodes

User avatar
thunderdog1138
Member
 
Posts: 34
Joined: Sun Dec 08, 2019 00:45
Location: Venator-class Star Destroyer in the Xanadu System
GitHub: thunderdog1138
In-game: thunderdog

Renaming and retexturing items/nodes

by thunderdog1138 » Mon Dec 09, 2019 23:43

Is there a simple way to rename and retexture items/nodes? Or do I have to reregister them?
Check out my Star Wars subgame.
 

User avatar
Pyrollo
Member
 
Posts: 335
Joined: Mon Jan 08, 2018 15:14
Location: Paris
GitHub: pyrollo
In-game: Naj

Re: Renaming and retexturing items/nodes

by Pyrollo » Tue Dec 10, 2019 10:26

Maybe register_alias is what you need. For texturing, you can simply change the texture pack I guess.
[ Display Modpack ] - [ Digiterms ] - [ Crater MG ] - [ LATE ]
 

User avatar
Linuxdirk
Member
 
Posts: 2425
Joined: Wed Sep 17, 2014 11:21
Location: Germany
In-game: Linuxdirk

Re: Renaming and retexturing items/nodes

by Linuxdirk » Tue Dec 10, 2019 10:54

thunderdog1138 wrote:Is there a simple way to rename and retexture items/nodes? Or do I have to reregister them?

You can override the registered items.

https://github.com/minetest/minetest/blob/8e63d22d6472b61477f804dc5b00705650f90409/doc/lua_api.txt#L4035-L4039

Code: Select all
minetest.override_item('default:stone', {
    description = 'My cool new name for stone',
    tiles = { 'mymod_my_cool_new_stone_texture.png' }
})

Simple local retexturing can be done using a texture pack.
 

User avatar
thunderdog1138
Member
 
Posts: 34
Joined: Sun Dec 08, 2019 00:45
Location: Venator-class Star Destroyer in the Xanadu System
GitHub: thunderdog1138
In-game: thunderdog

Re: Renaming and retexturing items/nodes

by thunderdog1138 » Tue Dec 10, 2019 12:28

Linuxdirk wrote:
thunderdog1138 wrote:Is there a simple way to rename and retexture items/nodes? Or do I have to reregister them?

You can override the registered items.

https://github.com/minetest/minetest/blob/8e63d22d6472b61477f804dc5b00705650f90409/doc/lua_api.txt#L4035-L4039

Code: Select all
minetest.override_item('default:stone', {
    description = 'My cool new name for stone',
    tiles = { 'mymod_my_cool_new_stone_texture.png' }
})

Simple local retexturing can be done using a texture pack.


Thanks!
Check out my Star Wars subgame.
 


Return to Modding Discussion



Who is online

Users browsing this forum: No registered users and 2 guests