Maschiaccio72 Posted March 17, 2020 Posted March 17, 2020 Hello everyone, I am ABSOLUTELY NEW to minecraft modding (my first day!) and I understand my question could look stupid but I didn't understand one thing... Is it possible (I assume it SHOULD BE) to create only ONE BLOCK (one class) and register two different copies of the same class changing only the texture face? I wand to realize a set of simple building blocks. In all the basic tutorials I found there is always ONE MODEL and ONE predefined TEXTURE each block class....(using json config files that MUST HAVE same name) Being a programmer I think it's not possible such approach.... there is something I don't know ? Can someone explain me how this REALLY works? Thanks alot! Quote
imacatlolol Posted March 18, 2020 Posted March 18, 2020 (edited) Just register two separate instances of the same class and use different registry names. Vanilla does this a lot, check the Blocks class. Edited March 18, 2020 by imacatlolol Edited for clarity Quote I'm eager to learn and am prone to mistakes. Don't hesitate to tell me how I can improve.
TheGreyGhost Posted March 18, 2020 Posted March 18, 2020 Hi You could try looking at some of the examples in this example mod eg mbe03 which uses one model and multiple textures https://github.com/TheGreyGhost/MinecraftByExample/tree/master The 1.14.4 version is on this branch: https://github.com/TheGreyGhost/MinecraftByExample/tree/1-14-4-partial -TGG Quote
Maschiaccio72 Posted March 22, 2020 Author Posted March 22, 2020 On 3/18/2020 at 5:19 AM, imacatlolol said: Just register two separate instances of the same class and use different registry names. Vanilla does this a lot, check the Blocks class. thank you! Now I understood how registering works and how json is "linked" with class Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.