Jump to content

Coder

Members
  • Posts

    94
  • Joined

  • Last visited

Posts posted by Coder

  1. 25 minutes ago, diesieben07 said:
    • Permission checks most likely must be done server side. The client cannot be trusted.
    • If client needs to know permission information for display purposes (disable a button, etc.), send the information from server to client using a custom packet in PlayerLoggedInEvent.

    What if I create a client-side visual mod for example, that changes the way a mob is rendered everywhere, not only when connecting to a server.

    Should I make a toggle somewhere (like a GET request) that gives the client the green light to render it differently? I was trying to load the permissions when the client is starting.

  2. 18 minutes ago, diesieben07 said:

    Post init won't help you. Players can join and log out at any time. You need to check the permissions when the player actually tries to perform the potentially restricted action.

    I know, the idea is you get a list of what you can or can't do, it saves it and disables client function accordingly.

    So at the start of the client, it checks for permissions (GET request) and disables functions accordingly.

  3. 8 hours ago, jabelar said:

    Well, if you actually want to know if you're in the main screen I think you can just handle the GuiOpen event and check if it is the main screen gui. Otherwise, you can use the FML lifecycle events and assume that something like the post-init event should be after all the mods are loaded. Really depends on what you're specifically trying to do.

    Post init is a little too early for me, I can't get the clients UUID when doing that at this time.

  4. I managed to find the spectator option that makes the head only visible, however, it is targetting only the client-side player. Can you target a player that is caught from the getLoadedEntityList?

    Also, I am pretty sure that function only shows the head 100% visible. not half transparent. So this is probably not what I'm looking for. Looked at the teams class too for the transparency option, didn't find anything.

  5. 1 hour ago, Draco18s said:

    You will have to look at the code Minecraft uses to do what you want, then copy it for your own effect.

    It looks like it has something to do with the ModelBiped class. However, when looping though players with 

    Quote

    net.minecraft.entity.Entity o : mc.theWorld.getLoadedEntityList()

    it does not have the option of getMainModel(). Should it be there or I'm missing something?

×
×
  • Create New...

Important Information

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