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

Hi,

Currently, while looking through the code, neither vanilla or anything Forge adds takes into account custom dimension teleporters. See net.minecraft.world.WorldServer line 119:

 

this.worldTeleporter = new Teleporter(this); 

 

Whenever I want to teleport an entity, I have to create a new instance of my custom teleporter class. While this works fine, it's not really ideal, because the teleporter instances do not share a cached portal position list. (Thus, everytime something teleports, the teleporter has to search within a wide range of blocks for a matching portal). If Forge added the ability to register Teleporters (in DimensionManager?), then a system could be made in which only 1 teleporter instance is made for a WorldServer of a certain dimension (therefore the teleporter instance would not have to search for a portal everytime, reducing teleport time, which I'm sure everyone can agree is a good thing). At the moment, you can make the cache variable static and do manual removal checks, but I feel an actual alternative is better.

Just a thought - SH

OR, get this, You could NOT create a NEW instance of your Teleporter every time, and instead use a single instance that you manage for the world. Maybe... Naw that would make to much sense...

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

  • Author

Yes, you could do that. However, because vanilla teleporter class requires a WorldServer instance in the constructor, it would have to be made either in a method that subscribes to the World.Load event or making a variable in the portal block that gets instated if (teleporter == null). Either way is fine, but I just figured that if Forge spent the time to write all the other dimension stuff, they might as well go the whole way and make things neat.

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.