October 27, 20205 yr 14 minutes ago, Crazy_sheep said: public static DataParameter<Boolean> e; yes now initialize it using ObfuscationReflectionHelper.getPrivateValue 16 minutes ago, Crazy_sheep said: public void onspawn(EntityJoinWorldEvent e, World world) you dont need the world here 16 minutes ago, Crazy_sheep said: CreeperEntity creeper = (CreeperEntity) e.getEntity(); if (creeper instanceof CreeperEntity) first you do "you are a creeper" then you ask "are you a creeper "
October 27, 20205 yr Author @diesieben07can you give me a fast example of a field and i am not asking for the real code Edited October 27, 20205 yr by Crazy_sheep
October 27, 20205 yr Author there is a command that is called this creeper.getDataManager().getAll(); can i do someting with this Edited October 27, 20205 yr by Crazy_sheep
October 27, 20205 yr 13 minutes ago, Crazy_sheep said: can you give me a fast example of a field and i am not asking for the real code Quote please keep in mind that this is not a Java school. You are expected to have basic knowledge of Java before posting here.
October 27, 20205 yr 13 minutes ago, Crazy_sheep said: there is a command that is called this can you stop calling it a command the method you need is "get" it has 2 parameters the first one is the DataParameter the second one is the value you want to set Edited October 27, 20205 yr by loordgek
October 27, 20205 yr 3 minutes ago, loordgek said: the method you need is "get" Wouldn't it be "set"? Edited October 27, 20205 yr by Danebi
October 28, 20205 yr On 10/26/2020 at 4:27 AM, Draco18s said: Cool. I did this in a week. https://draco18s.itch.io/time-slicing-sword That's a really cool idea. 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.
October 28, 20205 yr 10 minutes ago, Crazy_sheep said: @loordgekbut i have the value how do i inalize it do 18 hours ago, diesieben07 said: Again, this is where basic Java knowledge comes in. You need to learn what fields are and how to use them.
October 28, 20205 yr Author how long will this topic go on because i wanna close it but i am only gonne close it if i have a awnser Edited October 28, 20205 yr by Crazy_sheep
October 28, 20205 yr 21 hours ago, diesieben07 said: 21 hours ago, Crazy_sheep said: ObfuscationReflectionHelper.getPrivateValue(CreeperEntity.class, null,"field_184714_b"); Great you have the value. How about you do something with it instead of just ... ignoring it. 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 28, 20205 yr Author @Draco18sso do i just need to put ObfuscationReflectionHelper.getPrivateValue(CreeperEntity.class, null,"field_184714_b"); into the field?
October 28, 20205 yr 25 minutes ago, Crazy_sheep said: @Draco18sso do i just need to put ObfuscationReflectionHelper.getPrivateValue(CreeperEntity.class, null,"field_184714_b"); into the field? Yes. Edited October 28, 20205 yr by Danebi
October 28, 20205 yr Author i think i am getting very close to the answer but how do i set it? because i have this static DataParameter<Boolean> test = ObfuscationReflectionHelper.getPrivateValue(CreeperEntity.class, null,"field_184714_b"); Edited October 28, 20205 yr by Crazy_sheep
October 28, 20205 yr TIL DataParameter's are DataManagers.... Seriously, this is just a giant thread of you messing up basic java systems, not listening to people who are trying to help you, and having no idea what you're doing... I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
October 29, 20205 yr Author ok i am gonne close this forum and i am gonne stop modding minecraft because i am just garbage at java
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.