Skip to content

Commit

Permalink
Resolve PR queries
Browse files Browse the repository at this point in the history
  • Loading branch information
bundabrg committed Jul 21, 2020
1 parent cfafe03 commit 902b2e0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public boolean isCacheChunks() {

@Override
public int getCacheImages() {
return node.getNode("cache-skins").getInt(0);
return node.getNode("cache-skins").getInt(180);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import com.nukkitx.protocol.bedrock.packet.*;
import lombok.Getter;
import lombok.Setter;
import org.geysermc.connector.GeyserConnector;
import org.geysermc.connector.entity.attribute.Attribute;
import org.geysermc.connector.entity.attribute.AttributeType;
import org.geysermc.connector.entity.type.EntityType;
Expand All @@ -47,7 +46,6 @@
import org.geysermc.connector.scoreboard.Team;
import org.geysermc.connector.utils.AttributeUtils;
import org.geysermc.connector.utils.MessageUtils;
import org.geysermc.connector.network.session.cache.EntityEffectCache;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ public class SkinProvider {
public static final Skin EMPTY_SKIN = new Skin(-1, "steve", STEVE_SKIN);
public static final byte[] ALEX_SKIN = new ProvidedSkin("bedrock/skin/skin_alex.png").getSkin();
public static final Skin EMPTY_SKIN_ALEX = new Skin(-1, "alex", ALEX_SKIN);
private static Map<String, Skin> cachedSkins = new ConcurrentHashMap<>();
private static Map<String, CompletableFuture<Skin>> requestedSkins = new ConcurrentHashMap<>();
private static final Map<String, Skin> cachedSkins = new ConcurrentHashMap<>();
private static final Map<String, CompletableFuture<Skin>> requestedSkins = new ConcurrentHashMap<>();

public static final Cape EMPTY_CAPE = new Cape("", "no-cape", new byte[0], -1, true);
private static Map<String, Cape> cachedCapes = new ConcurrentHashMap<>();
private static Map<String, CompletableFuture<Cape>> requestedCapes = new ConcurrentHashMap<>();
private static final Map<String, Cape> cachedCapes = new ConcurrentHashMap<>();
private static final Map<String, CompletableFuture<Cape>> requestedCapes = new ConcurrentHashMap<>();

public static final SkinGeometry EMPTY_GEOMETRY = SkinProvider.SkinGeometry.getLegacy(false);
private static Map<UUID, SkinGeometry> cachedGeometry = new ConcurrentHashMap<>();
private static final Map<UUID, SkinGeometry> cachedGeometry = new ConcurrentHashMap<>();

public static final boolean ALLOW_THIRD_PARTY_EARS = GeyserConnector.getInstance().getConfig().isAllowThirdPartyEars();
public static String EARS_GEOMETRY;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
import com.nukkitx.protocol.bedrock.data.skin.ImageData;
import com.nukkitx.protocol.bedrock.data.skin.SerializedSkin;
import com.nukkitx.protocol.bedrock.packet.PlayerListPacket;

import com.nukkitx.protocol.bedrock.packet.PlayerSkinPacket;
import lombok.AllArgsConstructor;
import lombok.Getter;
import org.geysermc.connector.common.AuthType;
Expand Down Expand Up @@ -238,16 +236,6 @@ public static void requestAndHandleSkinAndCape(PlayerEntity entity, GeyserSessio
playerAddPacket.getEntries().add(updatedEntry);
session.sendUpstreamPacket(playerAddPacket);

// // Update SKin
// PlayerSkinPacket playerSkinPacket = new PlayerSkinPacket();
// playerSkinPacket.setUuid(updatedEntry.getUuid());
// playerSkinPacket.setSkin(updatedEntry.getSkin());
// playerSkinPacket.setOldSkinName("OldName");
// playerSkinPacket.setNewSkinName("NewName");
// playerSkinPacket.setTrustedSkin(true);
// session.getUpstream().sendPacket(playerSkinPacket);
// session.getConnector().getLogger().debug("Sending skin for " + entity.getUsername());

if (!entity.isPlayerList()) {
PlayerListPacket playerRemovePacket = new PlayerListPacket();
playerRemovePacket.setAction(PlayerListPacket.Action.REMOVE);
Expand Down

0 comments on commit 902b2e0

Please sign in to comment.