fix some stuff
This commit is contained in:
parent
52795a349f
commit
58c4293bc9
6 changed files with 2901 additions and 2908 deletions
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
|
@ -816,7 +816,7 @@ public class EntityPlayerMP extends EntityPlayer implements ICrafting {
|
||||||
var2 = (var2 >> 5) + 2;
|
var2 = (var2 >> 5) + 2;
|
||||||
|
|
||||||
if (var2 > 3 && var2 < 15) {
|
if (var2 > 3 && var2 < 15) {
|
||||||
this.renderDistance = var2;
|
this.renderDistance = var2 > 10 ? 10 : var2;
|
||||||
if(this.lastRenderDistance != this.renderDistance) {
|
if(this.lastRenderDistance != this.renderDistance) {
|
||||||
if(this.mcServer.isSinglePlayer() && this.mcServer.getServerOwner().equals(this.username)) {
|
if(this.mcServer.isSinglePlayer() && this.mcServer.getServerOwner().equals(this.username)) {
|
||||||
for(int i = 0; i < this.mcServer.worldServers.length; ++i) {
|
for(int i = 0; i < this.mcServer.worldServers.length; ++i) {
|
||||||
|
|
|
@ -132,7 +132,7 @@ public class NetLoginHandler extends NetHandler {
|
||||||
this.kickUser(var1);
|
this.kickUser(var1);
|
||||||
} else {
|
} else {
|
||||||
EntityPlayerMP var2 = this.mcServer.getConfigurationManager().createPlayerForUser(this.clientUsername);
|
EntityPlayerMP var2 = this.mcServer.getConfigurationManager().createPlayerForUser(this.clientUsername);
|
||||||
var2.renderDistance = var2.lastRenderDistance = this.viewDistance;
|
var2.renderDistance = var2.lastRenderDistance = (this.viewDistance > 10 && !this.mcServer.getServerOwner().equals(this.clientUsername)) ? 10 : this.viewDistance;
|
||||||
if (var2 != null) {
|
if (var2 != null) {
|
||||||
this.mcServer.getConfigurationManager().initializeConnectionToPlayer(this.myTCPConnection, var2);
|
this.mcServer.getConfigurationManager().initializeConnectionToPlayer(this.myTCPConnection, var2);
|
||||||
}else {
|
}else {
|
||||||
|
|
|
@ -91,12 +91,9 @@ public class PlayerManager {
|
||||||
player = cycleAllRenderDistance(player);
|
player = cycleAllRenderDistance(player);
|
||||||
}else {
|
}else {
|
||||||
if(player.lastRenderDistance != player.renderDistance) {
|
if(player.lastRenderDistance != player.renderDistance) {
|
||||||
// these 2 are called within recreatePlayerEntity
|
player.lastRenderDistance = player.renderDistance;
|
||||||
// removePlayer(player);
|
|
||||||
player.playerNetServerHandler.playerEntity = player.mcServer.getConfigurationManager().recreatePlayerEntity(player, 0, true, false);
|
player.playerNetServerHandler.playerEntity = player.mcServer.getConfigurationManager().recreatePlayerEntity(player, 0, true, false);
|
||||||
player = player.playerNetServerHandler.playerEntity;
|
player = player.playerNetServerHandler.playerEntity;
|
||||||
player.lastRenderDistance = player.renderDistance;
|
|
||||||
// addPlayer(player.playerNetServerHandler.playerEntity);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return player;
|
return player;
|
||||||
|
@ -112,14 +109,11 @@ public class PlayerManager {
|
||||||
EntityPlayerMP playerReload = (EntityPlayerMP)curList.get(i);
|
EntityPlayerMP playerReload = (EntityPlayerMP)curList.get(i);
|
||||||
boolean returnThisOne = playerReload.equals(player);
|
boolean returnThisOne = playerReload.equals(player);
|
||||||
if (playerReload.lastRenderDistance != player.renderDistance) {
|
if (playerReload.lastRenderDistance != player.renderDistance) {
|
||||||
// these 2 are called within recreatePlayerEntity
|
playerReload.lastRenderDistance = playerReload.renderDistance = player.renderDistance;
|
||||||
// removePlayer(playerReload);
|
|
||||||
playerReload.playerNetServerHandler.playerEntity = playerReload.mcServer.getConfigurationManager().recreatePlayerEntity(playerReload, 0, true, false);
|
playerReload.playerNetServerHandler.playerEntity = playerReload.mcServer.getConfigurationManager().recreatePlayerEntity(playerReload, 0, true, false);
|
||||||
playerReload = playerReload.playerNetServerHandler.playerEntity;
|
playerReload = playerReload.playerNetServerHandler.playerEntity;
|
||||||
playerReload.lastRenderDistance = playerReload.renderDistance;
|
|
||||||
}
|
}
|
||||||
if (returnThisOne) player = playerReload;
|
if (returnThisOne) player = playerReload;
|
||||||
// addPlayer(playerReload.playerNetServerHandler.playerEntity);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return player;
|
return player;
|
||||||
|
|
|
@ -247,7 +247,7 @@ public class ServerConfigurationManager {
|
||||||
return "The server is full!";
|
return "The server is full!";
|
||||||
}else {
|
}else {
|
||||||
for(EntityPlayerMP pp : (List<EntityPlayerMP>)this.playerEntityList) {
|
for(EntityPlayerMP pp : (List<EntityPlayerMP>)this.playerEntityList) {
|
||||||
if(pp.username.equals(par2Str)) {
|
if(pp.username.equalsIgnoreCase(par2Str)) {
|
||||||
return "Someone with your username is already on this world";
|
return "Someone with your username is already on this world";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue