Posted October 23, 20205 yr is there a command to get a private value? because this does not work CreeperEntity creeper = (CreeperEntity) event.getEntity(); Field f = creeper.getClass().getDeclaredField("POWERED"); //this errors and i dont know why f.setAccessible(true); so i hope you guys give me good answers EDIT: this is closed(because i am gonne stop modding minecraft and i am garbage at java) and if you still wanna post something you can but this forum is closed Edited October 29, 20205 yr by Crazy_sheep
October 23, 20205 yr Author when i try to put the ObfuscationReflectionHelper with Field f = creeper.getclass.ObfuscationReflectionHelper or creeper.ObfuscationReflectionHelper its not a command
October 23, 20205 yr Author @diesieben07 oh come on why would i make a forum and on java there are no tutorials on how to get private value or a diffrent class when i try to put the ObfuscationReflectionHelper and this is not event a command in java i think that awsner does not help at all
October 23, 20205 yr Author Quote this is like drive a car without knowing what a road is that made me laugh just think about it someone just driving a car in the forest lol but the ObfuscationReflectionHelper is without and attachments like this creeper.ObfuscationReflectionHelper because this does not work but just like this Field f = ObfuscationReflectionHelper is a command so i think all i need to know now is how to use the ObfuscationReflectionHelper command and there is a getPrivateValue command so can you just give me a basic example code on how to use ObfuscationReflectionHelper.getPrivateValue() and i am not asking for example code from that i could just copy and paste but i mean a tutorial example code Edited October 23, 20205 yr by Crazy_sheep
October 23, 20205 yr Author ok but how do i get the class instance and is the class name just the class name what its called(its probely the class name like this "class name here")
October 23, 20205 yr You do it the same way you use the Math class to get the value of Pi. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
October 23, 20205 yr Author @Draco18sbut i use ObfuscationReflectionHelper so what do i need to do with ObfuscationReflectionHelper?
October 23, 20205 yr Call its methods? They're intelligently named. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
October 23, 20205 yr Author @Draco18sum... ok.. but still:how do i get a private value and plz give me good answers that i understand because i dont want this to be the second topic that failed again like the first topic
October 23, 20205 yr GOSH MAYBE THERE'S A METHOD CALLED "getPrivateValue" IN THE CLASS. HAVE YOU TRIED READING THE AVAILABLE METHODS? Edited October 23, 20205 yr by Draco18s Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
October 23, 20205 yr Author @Draco18si did not mean to put that part as a mean part but so you know thats the main part(and for some reason i wanted to do that.... i hate my life) sorry. and i already know about the getPrivateValue but how do i use it
October 23, 20205 yr @Draco18s do you understand what i typed ? @Crazy_sheep read this https://github.com/MinecraftForge/MinecraftForge/blob/1.16.x/src/main/java/net/minecraftforge/fml/common/ObfuscationReflectionHelper.java#L67-L80
October 23, 20205 yr Author @loordgekah yeah oh you write another thing i needed to refresh idk not really i did not under stand where it needs to go Edited October 23, 20205 yr by Crazy_sheep
October 23, 20205 yr the instance parameter is null because the field is static the fieldName parameter is "field_184714_b" (can somebody explain why the name is so weird )
October 23, 20205 yr 3 minutes ago, Crazy_sheep said: idk where the most of the code needs to go so help this is BASIC java
October 25, 20205 yr Author @loordgekbut i dont know how to use the getPrivateValue can you maybe help me with that it would really help😉 Edited October 25, 20205 yr by Crazy_sheep
October 25, 20205 yr i told you how to do it but you dont have the java knowledge to understand it so plz learn java
October 25, 20205 yr Author 1 hour ago, loordgek said: i told you how to do it but you dont have the java knowledge to understand it so plz learn java thats what i am trying but learning java is kinda boring
October 25, 20205 yr what would you have 1 a boring time learning java 2 a frustrating time modding and not getting somewhere
October 25, 20205 yr Author @loordgekwell i will first go for option 1 and i am trying to learn java but its pretty hard
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.