21w37a
This commit is contained in:
1 parent
70754dbfe8
commit
bc175509a2
24 files changed
+155
-113
No files matched your search
@@ -40,7 +40,7 @@ public class EntityPlayerMPFake extends ServerPlayerEntity
|
||||
UserCache.setUseRemote(false);
|
||||
GameProfile gameprofile;
|
||||
try {
|
||||
gameprofile = server.getUserCache().method_14515(username); //findByName .orElse(null)
|
||||
gameprofile = server.getUserCache().findByName(username).orElse(null); //findByName .orElse(null)
|
||||
}
|
||||
finally {
|
||||
UserCache.setUseRemote(server.isDedicated() && server.isOnlineMode());
|
||||
@@ -70,7 +70,7 @@ public class EntityPlayerMPFake extends ServerPlayerEntity
|
||||
instance.interactionManager.changeGameMode(gamemode);
|
||||
server.getPlayerManager().sendToDimension(new EntitySetHeadYawS2CPacket(instance, (byte) (instance.headYaw * 256 / 360)), dimensionId);//instance.dimension);
|
||||
server.getPlayerManager().sendToDimension(new EntityPositionS2CPacket(instance), dimensionId);//instance.dimension);
|
||||
instance.getServerWorld().getChunkManager().updatePosition(instance);
|
||||
//instance.world.getChunkManager(). updatePosition(instance);
|
||||
instance.dataTracker.set(PLAYER_MODEL_PARTS, (byte) 0x7f); // show all model layers (incl. capes)
|
||||
instance.getAbilities().flying = flying;
|
||||
return instance;
|
||||
@@ -80,7 +80,7 @@ public class EntityPlayerMPFake extends ServerPlayerEntity
|
||||
{
|
||||
player.getServer().getPlayerManager().remove(player);
|
||||
player.networkHandler.disconnect(new TranslatableText("multiplayer.disconnect.duplicate_login"));
|
||||
ServerWorld worldIn = player.getServerWorld();//.getWorld(player.dimension);
|
||||
ServerWorld worldIn = player.method_37908();//.getWorld(player.dimension);
|
||||
GameProfile gameprofile = player.getGameProfile();
|
||||
EntityPlayerMPFake playerShadow = new EntityPlayerMPFake(server, worldIn, gameprofile, true);
|
||||
server.getPlayerManager().onPlayerConnect(new NetworkManagerFake(NetworkSide.SERVERBOUND), playerShadow);
|
||||
@@ -95,7 +95,7 @@ public class EntityPlayerMPFake extends ServerPlayerEntity
|
||||
|
||||
server.getPlayerManager().sendToDimension(new EntitySetHeadYawS2CPacket(playerShadow, (byte) (player.headYaw * 256 / 360)), playerShadow.world.getRegistryKey());
|
||||
server.getPlayerManager().sendToAll(new PlayerListS2CPacket(PlayerListS2CPacket.Action.ADD_PLAYER, playerShadow));
|
||||
player.getServerWorld().getChunkManager().updatePosition(playerShadow);
|
||||
//player.world.getChunkManager().updatePosition(playerShadow);
|
||||
playerShadow.getAbilities().flying = player.getAbilities().flying;
|
||||
return playerShadow;
|
||||
}
|
||||
@@ -132,7 +132,7 @@ public class EntityPlayerMPFake extends ServerPlayerEntity
|
||||
if (this.getServer().getTicks() % 10 == 0)
|
||||
{
|
||||
this.networkHandler.syncWithPlayerPosition();
|
||||
this.getServerWorld().getChunkManager().updatePosition(this);
|
||||
//this.world.getChunkManager().updatePosition(this);
|
||||
onTeleportationDone(); //<- causes hard crash but would need to be done to enable portals // not as of 1.17
|
||||
}
|
||||
try
|
||||
|
||||
Reference in new issue
Block a user