Jump to content

How can I set a custom Layer to a username? FORGE 1.8


JLibhat

Recommended Posts

 

How can I set a custom Layer to a username?

 

 

Is this code okay? and what is the code to establish the layer.

 

public void init(FMLInitializationEvent event)
    {
        System.out.println("DIRT BLOCK >> "+Blocks.dirt.getUnlocalizedName());
        
        if(Minecraft.getMinecraft().getSession().getUsername() == "USERNAME_ONE" || Minecraft.getMinecraft().getSession().getUsername() == "USERNAME_TWO" )
        {
             custom cape code.

        }
    }

Link to comment
Share on other sites

No. No capes. Mojang explicitly stated that modders should not mess with capes.

Adding backdoors to your mod is also a bad idea.

12an5t.jpg.abb0212b893339c1b6477823abd0224d.jpg

 

In addition, putting the cape code in post init makes no sense. Post init occurs when the game launches; it doesn't do anything about how a player is rendered.

Edited by DavidM
  • Like 2

Some tips:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

Link to comment
Share on other sites

8 hours ago, DavidM said:

No. No capes. Mojang explicitly stated that modders should not mess with capes.

Adding backdoors to your mod is also a bad idea.

12an5t.jpg.abb0212b893339c1b6477823abd0224d.jpg

 

In addition, putting the cape code in post init makes no sense. Post init occurs when the game launches; it doesn't do anything about how a player is rendered.

Mojang passed it to my ass, apart from the fact that he does not pay attention to the community, they want to ban any shit.

Link to comment
Share on other sites

25 minutes ago, JLibhat said:

Mojang passed it to my ass, apart from the fact that he does not pay attention to the community, they want to ban any shit.

If you want to ignore rules and insist on making prohibited features, then I'm afraid you will find it hard to find help for your mod.

Edited by DavidM

Some tips:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

Link to comment
Share on other sites

  • Guest locked this topic
Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.