Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

In the PlayerTickEvent I want to test if the player is in my custom moon dimension and change the gravity but nothing I have tried has worked. I noticed that some things I tried would work but when I change dimensions either with /forge command or teleport function, the gravity would be the same as the dimension I came from. When I re logged it worked though.

  • Author

I change a static variable in the LivingEntity to change the gravity so I'm guessing it's only changing on one side. How would I change it on both sides?

Because the server and the client may not be running on the same physical side you need to use networking. Forge does a lot of the work for you, see the official documentation: https://mcforge.readthedocs.io/en/1.15.x/networking/

You need to have the logical server send a message and then have the logical client receive that message and do whatever it needs to as a result (in this case change the gravity).

Also, the functionality that you are describing sounds quite similar to Galacticraft. You might want to to a look at their code for a reference:

https://github.com/micdoodle8/Galacticraft

Edited by jdawg3636

Website: jdawg3636.com
Discord: discord.gg/EKeM7Jz

  • Author

I've been messing around with Networking and I have no idea what i'm doing.

Edited by FossilFind

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.