jredfox Posted May 14, 2018 Author Posted May 14, 2018 20 hours ago, jabelar said: I didn't have a lot of time to look at this further, as I have a very busy weekend. But I did a little research and based on several discussions in Bukkit and Spigot developer forums there is pretty much agreement that there is basically two ways to go. 1) If you have ability to do client-side mod, do it that way -- the simple way I explained above where you cancel the GUI and send the respawn packet immediately. 2) Otherwise, you can't let the entity actually die normally at all. Instead of letting it actually respawn (along with recreating/cloning the entity and such) you basically just want to restore the health and teleport to the spawn location. Of course you need to clean up other things like extinguishing fire, food and oxygen levels, stats, and all the rest of the stuff. But you want to avoid either the server or client entering any of the vanilla respawn code. I agree that once you get into the actual respawning process it is way to hard to get it all to work and have client and server sync. Despite literally copying the exact vanilla code it is still behaving badly (I think because of lack of synchronization between the client and server). I'm sure there is some advanced solution but I can't see it. So I think it is worth thinking about Option #2 where you don't do the full cloning of the player but rather just move them and get them back to fresh status like an actual respawn. issue is solved with calling this right after my respawn method you were initially right it had to do with the network connection coords cheat system. try { Method capture = NetHandlerPlayServer.class.getDeclaredMethod("captureCurrentPosition"); capture.setAccessible(true); capture.invoke(player.connection); } catch (Throwable t) { t.printStackTrace(); } 1 Quote
jabelar Posted May 14, 2018 Posted May 14, 2018 Cool! Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/
jredfox Posted May 14, 2018 Author Posted May 14, 2018 (edited) 50 minutes ago, jabelar said: Cool! bad news I have two new issues to solve though one is related. Fire on client side doesn't get put out if: another player is in render distence player is in same dimension Fire on client doesn't get put out till you sprint even changing dimensions still displays that Edit: reproduced in vanilla going to be looking into the sprint packet to see what it does to fix ithttps://bugs.mojang.com/browse/MC-129570 Edited May 14, 2018 by jredfox Quote
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.