Search in sources :

Example 1 with IMixinNetworkPlayerInfo

use of cc.hyperium.mixins.client.network.IMixinNetworkPlayerInfo in project Hyperium by HyperiumClient.

the class MixinRenderGlobal method removeEntity.

@Inject(method = "onEntityRemoved", at = @At("HEAD"))
private void removeEntity(Entity entityIn, CallbackInfo ci) {
    if (entityIn instanceof AbstractClientPlayer) {
        MemoryHelper.INSTANCE.queueDelete(((AbstractClientPlayer) entityIn).getLocationCape());
        MemoryHelper.INSTANCE.queueDelete(((AbstractClientPlayer) entityIn).getLocationSkin());
        NetworkPlayerInfo info = ((IMixinAbstractClientPlayer) entityIn).callGetPlayerInfo();
        if (info == null)
            return;
        ((IMixinNetworkPlayerInfo) info).setPlayerTexturesLoaded(false);
        ((IMixinNetworkPlayerInfo) info).setLocationCape(null);
        ((IMixinNetworkPlayerInfo) info).setLocationSkin(null);
    }
}
Also used : IMixinAbstractClientPlayer(cc.hyperium.mixins.client.entity.IMixinAbstractClientPlayer) AbstractClientPlayer(net.minecraft.client.entity.AbstractClientPlayer) IMixinAbstractClientPlayer(cc.hyperium.mixins.client.entity.IMixinAbstractClientPlayer) NetworkPlayerInfo(net.minecraft.client.network.NetworkPlayerInfo) IMixinNetworkPlayerInfo(cc.hyperium.mixins.client.network.IMixinNetworkPlayerInfo) IMixinNetworkPlayerInfo(cc.hyperium.mixins.client.network.IMixinNetworkPlayerInfo) Inject(org.spongepowered.asm.mixin.injection.Inject)

Aggregations

IMixinAbstractClientPlayer (cc.hyperium.mixins.client.entity.IMixinAbstractClientPlayer)1 IMixinNetworkPlayerInfo (cc.hyperium.mixins.client.network.IMixinNetworkPlayerInfo)1 AbstractClientPlayer (net.minecraft.client.entity.AbstractClientPlayer)1 NetworkPlayerInfo (net.minecraft.client.network.NetworkPlayerInfo)1 Inject (org.spongepowered.asm.mixin.injection.Inject)1