Hello! I was updating a mod from 1.2.5 to 1.3.2, when it came across that in 1.3.2, in EntityLiving, moveForward and moveStrafing are not visible.
Eclipse tells me:
The field EntityLiving.moveForward is not visible
The field EntityLiving.moveStrafing is not visible
Take a look at ModLoader's getPrivateValue(Class, Object, int) method. It can get private methods, fields, and objects that are private within another class.
Rollback Post to RevisionRollBack
“Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program.”
- Linus Torvalds (Finnish American, software engineer and hacker, principal force behind the development of the Linux kernel)
Take a look at ModLoader's getPrivateValue(Class, Object, int) method. It can get private methods, fields, and objects that are private within another class.
I can't figure it out! Forgive me, but please correct this code:
I googled around and found this. I think it might help.
Rollback Post to RevisionRollBack
“Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program.”
- Linus Torvalds (Finnish American, software engineer and hacker, principal force behind the development of the Linux kernel)
I really do appreciate your help! Please stick with me! I'm not trying to set another value, I'm trying to retrieve it and make the pegasus move the same as the living entity that is riding on it. moveForward and moveStrafing are different values that get changed base on what the player/thing is doing.
I mean, I don't need to use this method to set the pegasus moving forward, just to see what the rider is doing.
BTW, the code that I'm having trouble with is in the EntityPegasus.java file. If you need more code, just let me know.
also
I just looked in EntityLiving.java and moveForward and moveStrafing. Both have protected float:
I really do appreciate your help! Please stick with me! I'm not trying to set another value, I'm trying to retrieve it and make the pegasus move the same as the living entity that is riding on it. moveForward and moveStrafing are different values that get changed base on what the player/thing is doing.
I mean, I don't need to use this method to set the pegasus moving forward, just to see what the rider is doing.
BTW, the code that I'm having trouble with is in the EntityPegasus.java file. If you need more code, just let me know.
also
I just looked in EntityLiving.java and moveForward and moveStrafing. Both have protected float:
Protected means that it can only be accessed by subclasses. So, if you made a new class that extended EntityLiving, you could access these variables directly, without a method call. BUT, if you made another class that extended something other than EntityLiving (or one of it's subclasses), you could not view the variable from that class.
“Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program.”
- Linus Torvalds (Finnish American, software engineer and hacker, principal force behind the development of the Linux kernel)
no, I was just using the same as moveForward and moveStrafing that the player input, to help with simplicity. Do you know a good up-to-date tutorial for keybinding, and linking keybindings to mob control?
Eclipse tells me:
The field EntityLiving.moveForward is not visible
The field EntityLiving.moveStrafing is not visible
Could you tell me if there is a way to fix this to make the
Take a look at ModLoader's getPrivateValue(Class, Object, int) method. It can get private methods, fields, and objects that are private within another class.
- Linus Torvalds (Finnish American, software engineer and hacker, principal force behind the development of the Linux kernel)
I can't figure it out! Forgive me, but please correct this code:
I googled around and found this. I think it might help.
- Linus Torvalds (Finnish American, software engineer and hacker, principal force behind the development of the Linux kernel)
I really do appreciate your help! Please stick with me! I'm not trying to set another value, I'm trying to retrieve it and make the pegasus move the same as the living entity that is riding on it. moveForward and moveStrafing are different values that get changed base on what the player/thing is doing.
I mean, I don't need to use this method to set the pegasus moving forward, just to see what the rider is doing.
BTW, the code that I'm having trouble with is in the EntityPegasus.java file. If you need more code, just let me know.
also
I just looked in EntityLiving.java and moveForward and moveStrafing. Both have protected float:
Protected means that it can only be accessed by subclasses. So, if you made a new class that extended EntityLiving, you could access these variables directly, without a method call. BUT, if you made another class that extended something other than EntityLiving (or one of it's subclasses), you could not view the variable from that class.
- Linus Torvalds (Finnish American, software engineer and hacker, principal force behind the development of the Linux kernel)
something like this? Please correct me - very new to this.