Skip to content

Commit

Permalink
tried all this, still not perfect.CONCLUDE bug in forge. wait for update
Browse files Browse the repository at this point in the history
  • Loading branch information
Lothrazar committed Nov 6, 2015
1 parent 71291d7 commit 2a78e26
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
24 changes: 19 additions & 5 deletions src/main/java/com/lothrazar/enderbook/ItemEnderBook.java
Original file line number Diff line number Diff line change
Expand Up @@ -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!!!
/*
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -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": "",
Expand Down

0 comments on commit 2a78e26

Please sign in to comment.