MixinSkullRenderer.java 文件源码

java
阅读 18 收藏 0 点赞 0 评论 0

项目:MineLittlePony 作者:
@Redirect(
        method = "renderSkull",
        at = @At(
                value = "INVOKE",
                target = "Lnet/minecraft/client/renderer/tileentity/TileEntitySkullRenderer;bindTexture(Lnet/minecraft/util/ResourceLocation;)V",
                ordinal = 4))
private void onBindTexture(TileEntitySkullRenderer tesr, ResourceLocation rl, float x, float y, float z, EnumFacing facing, float rotation, int meta,
                           @Nullable GameProfile profile, int p_180543_8_, float ticks) {
    if (profile != null) {
        Optional<ResourceLocation> skin = HDSkinManager.INSTANCE.getSkinLocation(profile, Type.SKIN, true);
        if (skin.isPresent())
            // rebind
            bindTexture(skin.get());
        else
            bindTexture(rl);
    } else
        bindTexture(rl);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号