Importing of models in non-minecraft namespaces

Get help and support for using Cubik Studio.
Post Reply

Importing of models in non-minecraft namespaces

Post by Energyxxer » 09 Nov 2016, 00:10

(This might not necessarily be a bug, just an overlook during the development of CS)

A lesser-known but handy feature in resource packs is the use of custom namespaces, to organize resources based on what's using it. For instance, all Minecraft resources are in the assets/minecraft directory within the resource pack, therefore, making all resources fall into the minecraft namespace. You can, however, make your own namespace by making a folder next to assets/minecraft with your own name. This is referred to by the resource files with the namespace, followed by a colon, and then the path from there. (e.g custom:textures/blocks/cheese).
This is used the most for mod development, as all assets are stored under the mod's namespace.

However, Cubik Studio doesn't seem to handle namespaces correctly. For instance, it can't seem to find textures from other namespaces, while the game can. Cubik Studio doesn't correctly recognize model parents from non-minecraft namespaces, even if the child model the parent model are in the same namespace, and just interprets the parent as an empty model with no elements. I use this quite a bit to separate minecraft assets from my own, and I'm sure people working on mods will surely run into this problem, too.
x
User avatar
Energyxxer
Early Adopter
Posts: 2
Joined: 27 Mar 2014, 01:14

Re: Importing of models in non-minecraft namespaces

Post by Profyle » 09 Nov 2016, 18:17

Energyxxer wrote: 09 Nov 2016, 00:10 (This might not necessarily be a bug, just an overlook during the development of CS)

A lesser-known but handy feature in resource packs is the use of custom namespaces, to organize resources based on what's using it. For instance, all Minecraft resources are in the assets/minecraft directory within the resource pack, therefore, making all resources fall into the minecraft namespace. You can, however, make your own namespace by making a folder next to assets/minecraft with your own name. This is referred to by the resource files with the namespace, followed by a colon, and then the path from there. (e.g custom:textures/blocks/cheese).
This is used the most for mod development, as all assets are stored under the mod's namespace.

However, Cubik Studio doesn't seem to handle namespaces correctly. For instance, it can't seem to find textures from other namespaces, while the game can. Cubik Studio doesn't correctly recognize model parents from non-minecraft namespaces, even if the child model the parent model are in the same namespace, and just interprets the parent as an empty model with no elements. I use this quite a bit to separate minecraft assets from my own, and I'm sure people working on mods will surely run into this problem, too.
Official Wynncraft mod confirmed?
x
User avatar
Profyle
Early Adopter
Posts: 39
Joined: 28 Feb 2015, 22:59

Re: Importing of models in non-minecraft namespaces

Post by Sphax » 10 Nov 2016, 11:55

Do you have a model as an example (json) which uses textures from another namespace and which doesn't work on import?

Or do you mean you can't load textures from another namespace when building a model from scratch in Cubik?
x
User avatar
Sphax
Admin
Posts: 1314
Joined: 10 Nov 2011, 10:44

Re: Importing of models in non-minecraft namespaces

Post by Energyxxer » 10 Nov 2016, 23:18

http://pastebin.com/9vRfq2KV
Here's something to put in assets/custom/models/item/ (Custom can be anything, but for the purpose of this example, it'll be custom)
Even if there was a stick texture in assets/minecraft/textures/items/
Right now, the model is pointing at the stick texture in the minecraft namespace, but Cubik doesn't load it.

If the stick texture is moved to the custom namespace, and minecraft: is changed to custom: in the JSON, Cubik doesn't load it either.

Strangely enough, if we remove the namespace in the JSON entirely and let it assume it is in the minecraft namespace, Cubik doesn't load the texture at all, regardless of where the texture was.
x
User avatar
Energyxxer
Early Adopter
Posts: 2
Joined: 27 Mar 2014, 01:14

Post Reply

Return to “Help Centre”