Help with multiple mob skins code

Started by G_will on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with multiple mob skins code

so basically, I inserted this bit of code 

int rando = (int)(Math.random()*2)+1
                    
                    if(rando==1){
                        return new ResourceLocation("funni_cretins:textures/frog.png");
                     }
                    
                    else{
                        return new ResourceLocation("funni_cretins:textures/frog2.png");
                        }

into the areas where it's importing the texture, I am not smart enough to figure out why it can't compile so any help would be appreciated 

Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't know anything about…
Thu, 10/22/2020 - 15:06

I don't know anything about code, but you can make it so a new mob with the different texture is spawned when a procedure is called.  Make sure to copy the rotation of the original mob!