Merge branch 'master' into 1.17

# Conflicts:
#	src/main/java/carpet/patches/EntityPlayerMPFake.java
This commit is contained in:
gnembon committed 2021-05-05 08:34:22 -03:00
commit 874b177da6
1 file changed
+10
@@ -18,6 +18,7 @@ import net.minecraft.server.ServerTask;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.server.network.ServerPlayerInteractionManager;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.UserCache;
import net.minecraft.util.registry.RegistryKey;
import net.minecraft.world.GameMode;
import net.minecraft.world.World;
@@ -39,7 +40,16 @@ public class EntityPlayerMPFake extends ServerPlayerEntity
if (gameprofile == null)
{
return null;
ServerPlayerInteractionManager interactionManagerIn = new ServerPlayerInteractionManager(worldIn);
UserCache.setUseRemote(false);
GameProfile gameprofile;
try {
gameprofile = server.getUserCache().findByName(username);
}
finally {
UserCache.setUseRemote(server.isDedicated() && server.isOnlineMode());
}
if (gameprofile == null) return null;
if (gameprofile.getProperties().containsKey("textures"))
{
gameprofile = SkullBlockEntity.loadProperties(gameprofile);