ElTotisPro50 Posted January 20 Share Posted January 20 i saw this in a mod(the code is written in 1.16.5) but is giving me erros, it doesnt find player.playerInfo and playerInfo.playerTexturesLoaded, in the class that was made it doesnt extends anything public static void setPlayerSkin(AbstractClientPlayerEntity player, ResourceLocation texture) { if (player.getLocationSkin().equals(texture)) { return; } NetworkPlayerInfo playerInfo = player.playerInfo; if (playerInfo == null) return; Map<MinecraftProfileTexture.Type, ResourceLocation> playerTextures = playerInfo.playerTextures; playerTextures.put(MinecraftProfileTexture.Type.SKIN, texture); if (texture == null) { playerInfo.playerTexturesLoaded = false; } } Quote Link to comment Share on other sites More sharing options...
poopoodice Posted January 20 Share Posted January 20 It makes sense if it's done by access transformers. Quote Link to comment Share on other sites More sharing options...
ElTotisPro50 Posted January 20 Author Share Posted January 20 1 hour ago, poopoodice said: It makes sense if it's done by access transformers. but the dude made it and he didnt "connected" the NetworkPlayerInfo with the setPlayerSkin method or something Quote Link to comment Share on other sites More sharing options...
poopoodice Posted January 21 Share Posted January 21 They are private, and that explains why your IDE can't "find" it. If you navigate to the class you should see them, and in this case they probably made it visible (public) by using access transformers. Quote Link to comment Share on other sites More sharing options...
ElTotisPro50 Posted January 21 Author Share Posted January 21 59 minutes ago, poopoodice said: They are private, and that explains why your IDE can't "find" it. If you navigate to the class you should see them, and in this case they probably made it visible (public) by using access transformers. I know this is basic java knowledge but PLEASE tell me a solution, i already learned java but i never imagined how i can use public, private and protected(obviusly i use them but i dont know how to connect private fieds so my class) im BEGGING YOU tell me how, i tried some tutorials of how to access to private fields but it wasnt helpful Quote Link to comment Share on other sites More sharing options...
poopoodice Posted January 21 Share Posted January 21 (edited) Did you had a look at the link to the Forge doc I attached? Edited January 21 by poopoodice Quote Link to comment Share on other sites More sharing options...
ElTotisPro50 Posted January 21 Author Share Posted January 21 1 hour ago, poopoodice said: Did you had a look at the link to the Forge doc I attached? i wrote the accessmodifier thing, refreshed the build.gradle file and even restarted my idle but it didnt worked, i checked the location of where the .cfg file should be but there is nothing(src/main/resources/META-INF/accesstransformer.cfg), there is only the mods.toml Quote Link to comment Share on other sites More sharing options...
ElTotisPro50 Posted January 21 Author Share Posted January 21 2 hours ago, poopoodice said: Did you had a look at the link to the Forge doc I attached? hi i made the accesstransformer.cfg file with the text it needs for what im doing, but i dont know how to refresh the gradle project, in eclipse you right click in the project, gradle and refresh gradle project but im using intellij and all the tutorials for accesstransformers are made for eclipse #AbstractClientPlayerEntity public net.minecraft.client.entity.player.AbstractClientPlayerEntity field_175157_a # playerInfo #NetworkPlayerInfo public net.minecraft.client.network.play.NetworkPlayerInfo field_187107_a # playerTextures public net.minecraft.client.network.play.NetworkPlayerInfo field_178864_d # playerTexturesLoaded public net.minecraft.client.network.play.NetworkPlayerInfo func_178841_j()V # loadPlayerTextures public net.minecraft.client.network.play.NetworkPlayerInfo field_178867_a # gameProfile Quote Link to comment Share on other sites More sharing options...
poopoodice Posted January 21 Share Posted January 21 (edited) 1. There's "relaod button" on the gradle panel (mine is located on the upper right side). 2. Or in the "search everywhere" type "Reload All Gradle Projects" 3. Or close the IDE, delete .idea folder, and re-import the project. Edited January 21 by poopoodice Quote Link to comment Share on other sites More sharing options...
ElTotisPro50 Posted January 21 Author Share Posted January 21 1 hour ago, poopoodice said: 1. There's "relaod button" on the gradle panel (mine is located on the upper right side). 2. Or in the "search everywhere" type "Reload All Gradle Projects" 3. Or close the IDE, delete .idea folder, and re-import the project. thank you :), hey "your button that is located on the upper right side", does it do the same as the "Reload All Gradle Projects" in search everywhere? Quote Link to comment Share on other sites More sharing options...
poopoodice Posted January 21 Share Posted January 21 All 3 does the same thing (sort of) Quote Link to comment Share on other sites More sharing options...
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.