Jump to content

Recommended Posts

Posted
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 "

Posted
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.

 

Posted (edited)
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 by loordgek
Posted
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.

 

 

Posted
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.

 

Posted
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.

Posted (edited)
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 by Danebi
Posted (edited)

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 by Crazy_sheep
Posted

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...

 

  • Like 2

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements




×
×
  • Create New...

Important Information

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