From 2a78e26cf329cc1b4c389d9072164b488a001833 Mon Sep 17 00:00:00 2001 From: sam bassett Date: Fri, 6 Nov 2015 00:07:23 -0800 Subject: [PATCH] tried all this, still not perfect.CONCLUDE bug in forge. wait for update --- build.gradle | 2 +- .../lothrazar/enderbook/ItemEnderBook.java | 24 +++++++++++++++---- src/main/resources/mcmod.info | 2 +- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 261323b..cd4d74d 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ buildscript { apply plugin: 'forge' -version = "1.8-1.0.1" +version = "1.8-1.0.2" group= "com.lothrazar.enderbook" archivesBaseName = "EnderBook" diff --git a/src/main/java/com/lothrazar/enderbook/ItemEnderBook.java b/src/main/java/com/lothrazar/enderbook/ItemEnderBook.java index 98c2a3b..62c26b3 100644 --- a/src/main/java/com/lothrazar/enderbook/ItemEnderBook.java +++ b/src/main/java/com/lothrazar/enderbook/ItemEnderBook.java @@ -137,14 +137,28 @@ public static void teleport(EntityPlayer player,int slot)// ItemStack enderBookI { WorldServer s = MinecraftServer.getServer().worldServers[0]; s.theChunkProviderServer.chunkLoadOverride = true; - s.theChunkProviderServer.unloadQueuedChunks(); - s.theChunkProviderServer.loadChunk(dest.getX(),dest.getZ()); + //s.theChunkProviderServer.unloadQueuedChunks(); + //s.theChunkProviderServer.unloadAllChunks();//!!NOTHING ELSE WORKED EITHERT!! + s.theChunkProviderServer.loadChunk(dest.getX(),dest.getZ()); } + player.worldObj.markBlockForUpdate(new BlockPos(loc.X,loc.Y,loc.Z)); + player.worldObj.markBlockForUpdate(new BlockPos(loc.X,loc.Y-1,loc.Z)); - - player.setPositionAndUpdate(loc.X-f,loc.Y + 0.9,loc.Z-f); - + //player.setPositionAndUpdate(loc.X-f,loc.Y + 0.9,loc.Z-f); + //MAYBE: + player.setPositionAndRotation(loc.X-f,loc.Y + 0.9,loc.Z-f,player.cameraYaw,player.cameraPitch); + + //MADE NO DIFFERENCEEEEEEEEEEEEEEEEEE + // String command = "/tp @p "+ dest.getX() + " "+dest.getY()+" "+dest.getZ(); + //MinecraftServer.getServer().getCommandManager().executeCommand(player, command); + + + + player.worldObj.markBlockForUpdate(new BlockPos(loc.X,loc.Y,loc.Z)); + player.worldObj.markBlockForUpdate(new BlockPos(loc.X,loc.Y,loc.Z)); + + //just in case nothing else works //GRAVEYARD BELOW!!! //LEAVING FAILED ATTEMPTS IN COMMENTS!!! /* diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 28461b7..2de3440 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -3,7 +3,7 @@ "modid": "enderbook", "name": "Ender Book", "description": "Adds a book that can be used to save your current location as a waypoint. It stores multiple waypoints in any dimension, but teleporting can only be done within the same dimension.", - "version": "1.8-1.0.1", + "version": "1.8-1.0.2", "mcversion": "1.8", "url": "", "updateUrl": "",