pitman-87 Posted November 14, 2012 Posted November 14, 2012 Hey guys, I have some issues with my TF2 teleporter mod, and I have no idea why that happens since 1.4.2 ( otherwise I wouldn ask here ) 1. Sometimes (SMP and SSP) when a player gets teleported to a location, the chunks won't load anymore. The player glitches around in the air (in creative mode it's possible to fly around). After that happens, nothing gets loaded anymore (entities stay on their place, squids are floating in midair, no new chunk updates). I know you wanna see some code, but I'm not sure if its relevant and if this is a bug of Forge or Minecraft or I missed something (maybe the server needs a call to pre-load some chunks since MC 1.4.2 or something) Everything I'm doing is sending the server a teleport request (sending a packet with coordinates) and the server sets the new player location with: player.setPositionAndUpdate(tp1.xCoord + 0.5F, tp1.yCoord + 0.3F, tp1.zCoord + 0.5F); My position after teleport: http://www.abload.de/img/2012-11-14_20.39.17xnp0p.png[/img] I still can fly around but no new chunk-updates: http://www.abload.de/img/2012-11-14_20.40.37yro1y.png[/img] 2. I'm not sure if that issue exists since 1.4.2 or before. When I'm using a portal to the nether I spawn sometimes inside some blocks under or beside the nether portal (both ways). I have absolutely no idea why this is related to my teleporter mod, but many users reported that to me (and it happened to me sometimes too). I appreciate your help -pit Quote My mods: TF2 Teleporter + Sentry + Dispenser Familiars API SpecialArmor & PrinterBlock
DarkGuardsman Posted November 15, 2012 Posted November 15, 2012 You need to force update the area before sending the player there. Though it kills my mod download to help you take a look at my code https://github.com/DarkGuardsman/GSM-TP/blob/master/src/common/aTele/Main/BlockTP.java you need this to cause the chunks to load world.markBlockAsNeedsUpdate(i, j + b, k); Quote http://i577.photobucket.com/albums/ss215/bobstrong/ModBannerMed.png[/img]
pitman-87 Posted November 15, 2012 Author Posted November 15, 2012 You need to force update the area before sending the player there. Though it kills my mod download to help you take a look at my code https://github.com/DarkGuardsman/GSM-TP/blob/master/src/common/aTele/Main/BlockTP.java you need this to cause the chunks to load world.markBlockAsNeedsUpdate(i, j + b, k); I tried it, but it don't help Even force chunkloading don't help and sometimes it happens with the /tp x y z command too. I quess I figured it out and the force chunkloading itself on startup was a problem. If I remove it, both issues are gone. Quote My mods: TF2 Teleporter + Sentry + Dispenser Familiars API SpecialArmor & PrinterBlock
DarkGuardsman Posted November 16, 2012 Posted November 16, 2012 guess i usually don't have that issue since i force update the chunk several times and check if its safe to teleport to the location. Btw nice mods wish you luck on updating them Quote http://i577.photobucket.com/albums/ss215/bobstrong/ModBannerMed.png[/img]
Recommended Posts
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.