diff --git a/src/main/java/net/minecraft/network/NetHandlerPlayServer.java b/src/main/java/net/minecraft/network/NetHandlerPlayServer.java index ef29bb8..ec301ae 100644 --- a/src/main/java/net/minecraft/network/NetHandlerPlayServer.java +++ b/src/main/java/net/minecraft/network/NetHandlerPlayServer.java @@ -2,9 +2,11 @@ import com.google.common.base.Charsets; import com.google.common.collect.Lists; + import io.netty.buffer.Unpooled; import io.netty.util.concurrent.Future; import io.netty.util.concurrent.GenericFutureListener; + import java.io.ByteArrayInputStream; import java.io.DataInputStream; import java.io.IOException; @@ -12,6 +14,7 @@ import java.util.Iterator; import java.util.Random; import java.util.concurrent.Callable; + import net.minecraft.block.material.Material; import net.minecraft.command.server.CommandBlockLogic; import net.minecraft.crash.CrashReport; @@ -79,8 +82,10 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; import net.minecraft.util.IntHashMap; +import net.minecraft.util.MathHelper; import net.minecraft.util.ReportedException; import net.minecraft.world.WorldServer; + import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -89,6 +94,7 @@ import cpw.mods.fml.common.eventhandler.Event; import net.minecraftforge.event.ForgeEventFactory; import net.minecraftforge.event.entity.player.PlayerInteractEvent; + import org.ultramine.permission.MinecraftPermissions; import org.ultramine.server.PermissionHandler; @@ -197,6 +203,9 @@ if (this.hasMoved) { + if(!playerEntity.worldObj.blockExists(MathHelper.floor_double(playerEntity.posX), 64, MathHelper.floor_double(playerEntity.posZ))) + return; + double d1; double d2; double d3; diff --git a/src/main/java/net/minecraft/world/World.java b/src/main/java/net/minecraft/world/World.java index 4d14299..88dd350 100644 --- a/src/main/java/net/minecraft/world/World.java +++ b/src/main/java/net/minecraft/world/World.java @@ -31,6 +31,7 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -2026,6 +2027,11 @@ par1Entity.onUpdate(); } } + else if(par1Entity.isEntityPlayerMP()) + { + ((EntityPlayerMP)par1Entity).getChunkMgr().updatePlayerPertinentChunks(); + ((EntityPlayerMP)par1Entity).getChunkMgr().update(); + } this.theProfiler.startSection("chunkCheck"); @@ -2739,14 +2745,13 @@ k = MathHelper.floor_double(entityplayer.posZ / 16.0D); int b0 = getChunkUpdateRadius(); - activeChunkSet.put(ChunkHash.chunkToKey(j, k), (byte)0); for (int l = -b0; l <= b0; ++l) { for (int i1 = -b0; i1 <= b0; ++i1) { int cx = l + j; int cz = i1 + k; - if(chunkExists(cx, cz) && chunkExists(cx-1, cz) && chunkExists(cx, cz-1) && chunkExists(cx+1, cz) && chunkExists(cx, cz+1)) + if(chunkRoundExists(cx, cz, 1)) { int key = ChunkHash.chunkToKey(cx, cz); int priority = Math.max(Math.abs(l), Math.abs(i1));