Jump to content

Recommended Posts

Posted

Well i need this more for an "experimental" fun type of thing. I want each player on the world to be affected by the earth gravitational pull. G force gives the objects that are very close to the earth's surface an acceleration of approx 9.8 m/s^2. Of course that this acceleration is not the same for objects that have a distance from earth's surface but it would be pointless for me to calculate the acceleration on minecraft for objects that are high up on the ground considering that the minecraft world has a radius of 256 blocks/meters. Anyway, i need an event that is fired each tick. I will get a list of players on the world and add 0.49 at their motion Y. Which means that each player will accelerate in the negative Y axis on a value of 9.8 blocks/ second. To be able to do this correctly i also want to know what is the default acceleration value that minecraft uses to simulate gravity.

 

Thank you for your time

Posted

TickEvent's sub-events. Eventually LivingUpdateEvent.

 

Acceleration is probably in Entity itself. I don't remember.

1.7.10 is no longer supported by forge, you are on your own.

Posted

...Entities already have gravitational downward motion..?

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

...Entities already have gravitational downward motion..?

 

I think you didnt get my point. I am doing this for fun. Testing different accelerations. It is true that entities have downward motion but i want to simulate the gravity on earth at minecraft. Shortly i want to see how will the minecraft world change if i change the motion value.

Posted

Start reading the vanilla code for entities, living entities etc. As I recall, they reach terminal velocity rather rapidly. They also interact with water.

 

If you're going to "have fun", then you should not only have gravity give an impetus, but you should also have air and water resist per speed in a way that results in equilibrium (terminal velocity in air or water). Once that's done, then you'll be ready to simulate gravity on the Moon or Mars (good luck finding air or water there).

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted

...Entities already have gravitational downward motion..?

 

I think you didnt get my point. I am doing this for fun. Testing different accelerations. It is true that entities have downward motion but i want to simulate the gravity on earth at minecraft. Shortly i want to see how will the minecraft world change if i change the motion value.

 

You missed my point.  The downward acceleration already experienced is identical to that of Earth's.

It would make sense if you wanted to fiddle with those values, sure, but making them "Like Earth" involves "Doing Nothing."

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

I haven't looked into this yet because of busy school projects and exams. However it seems to me that mindcraft has a terminal velocity and entities stop accelerating after a while, something that they wouldn't do in real life.

Posted

You mean like the real life effect that occurs do to air resistance and really, actually, exists and effects all objects?

 

https://en.m.wikipedia.org/wiki/Terminal_velocity

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

By all means, do whatever.

 

Just keep in mind that every entity handles its own movement.  That is, gravitational acceleration is handled in multiple places, depending on the entity type.

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.

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.