I kind of thought you would test how the code works on your own... if you want a small push, just change the 1 to a much lesser value and the two "* 4"s to a much lesser value.
Ok. You're right, I was being an idiot. I tested it out with much smaller values, and it works perfectly. But, right now I have it on my armor. It's going to be pretty rough putting the code in for a block.
Yeah, I know I need a tile entity, but replacing "player.rotatonYawHead" is something I don't know how to replace.
As I said, perhaps in less explicit terms, you need to obtain an angle relative to the horizontal axis from the positions of your tile entity and the entity being repelled. At least I believe that should work.
As I said, perhaps in less explicit terms, you need to obtain an angle relative to the horizontal axis from the positions of your tile entity and the entity being repelled. At least I believe that should work.
Yes, I know. I just don't know how I could do that with pre-existing code. I probably can't and have to write my own code, correct? If I have to write my own code, I'm not sure what to write. Thanks in advance.
I probably can't and have to write my own code, correct? If I have to write my own code, I'm not sure what to write.
Correct you will have to write the code yourself.
Although most of the Math can be done with the built in Math class which probably have methods for all the fancy calcs you need to do.
Are you familiar with the math involved with angles?
If not that's the place you would have to start
If you don't want copy paste code, and don't accept the given responses as what you want, then what do you really want?
Correct you will have to write the code yourself.
Although most of the Math can be done with the built in Math class which probably have methods for all the fancy calcs you need to do.
Are you familiar with the math involved with angles?
If not that's the place you would have to start
If you don't want copy paste code, and don't accept the given responses as what you want, then what do you really want?
I accept the given responses, but I don't know how to go about them. And yes, I'm not very familiar with the math class yet. But, I still know how to code many things throughout Java. I would say my knowledge is between the beginner and intermediate levels. Anyway, what I'm looking for is not a simple copy paste, but more of a direction. I know I may have to research all about angles and math mumbojumbo, but if you could save me the time, I would appreciate it. An example of a "direction" I would approve of is the code CrafterOfMines57 posted not to long ago. I had to make adjustments to it, but it was what I was looking for. If I'm being very unclear call me out on it. Thanks again.
That looks like the same terminology used everywhere, including inside Minecraft.
Also the logic and math is the same regardless of language or src code
That's why you put it into a TileEntity
Mhm as said earlier you will need a TileEntity
As I said, perhaps in less explicit terms, you need to obtain an angle relative to the horizontal axis from the positions of your tile entity and the entity being repelled. At least I believe that should work.
Drawing this out on paper makes it way easier to understand what's going on
EDIT: Also, in advance, anyone who wants to back him up, please don't waste your time and post. I'm sure you can do much better things with your time.
Nobody is here to write your code for you.
Correct you will have to write the code yourself.
Although most of the Math can be done with the built in Math class which probably have methods for all the fancy calcs you need to do.
Are you familiar with the math involved with angles?
If not that's the place you would have to start
If you don't want copy paste code, and don't accept the given responses as what you want, then what do you really want?
You just need: angleInDegrees = atan2(deltaY, deltaX) * 180 / PI
Also the logic and math is the same regardless of language or src code
Here's the block code(there's also probably a problem in here).
EDIT: Mind the messy code back from my mod tutorial days.
EDIT: I tried that. If that's it then I've messed something else up.