<commit_before>package uk.kihira.playerrugs.client;

import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTUtil;
import net.minecraftforge.client.IItemRenderer;
import org.lwjgl.opengl.GL11;
import uk.kihira.playerrugs.common.tileentities.PlayerRugTE;

public class PlayerRugItemRenderer implements IItemRenderer {

    private PlayerRugTESR rugRenderer;
    private PlayerRugTE fakeTileEntity;

    public PlayerRugItemRenderer(PlayerRugTESR rugRenderer) {
        this.rugRenderer = rugRenderer;
        fakeTileEntity = new PlayerRugTE();
        fakeTileEntity.blockMetadata = 2;
    }

    @Override
    public boolean handleRenderType(ItemStack item, ItemRenderType type) {
        return true;
    }

    @Override
    public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
        return true;
    }

    @Override
    public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
        if (item.hasTagCompound()) {
            fakeTileEntity.playerProfile = NBTUtil.func_152459_a(item.getTagCompound().getCompoundTag("PlayerProfile"));
        }

        switch (type) {
            case INVENTORY:
                GL11.glScalef(0.65f, 0.65f, 0.65f);
                fakeTileEntity.blockMetadata = 2;
                rugRenderer.renderTileEntityAt(fakeTileEntity, 0, 0, 0, 0);
                break;
            case EQUIPPED:
                fakeTileEntity.blockMetadata = 3;
                rugRenderer.renderTileEntityAt(fakeTileEntity, 0.25f, 0.25f, 0.25f, 0);
                break;
            case EQUIPPED_FIRST_PERSON:
                fakeTileEntity.blockMetadata = 0;
                rugRenderer.renderTileEntityAt(fakeTileEntity, 0.25f, 0.5f, 0.25f, 0);
                break;
            default:
                fakeTileEntity.blockMetadata = 0;
                rugRenderer.renderTileEntityAt(fakeTileEntity, -0.5f, 0f, -0.5f, 0);
        }
    }
}
<commit_msg>Fix #4<commit_after>package uk.kihira.playerrugs.client;

import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTUtil;
import net.minecraftforge.client.IItemRenderer;
import org.lwjgl.opengl.GL11;
import uk.kihira.playerrugs.common.tileentities.PlayerRugTE;

public class PlayerRugItemRenderer implements IItemRenderer {

    private PlayerRugTESR rugRenderer;
    private PlayerRugTE fakeTileEntity;

    public PlayerRugItemRenderer(PlayerRugTESR rugRenderer) {
        this.rugRenderer = rugRenderer;
        fakeTileEntity = new PlayerRugTE();
        fakeTileEntity.blockMetadata = 2;
    }

    @Override
    public boolean handleRenderType(ItemStack item, ItemRenderType type) {
        return true;
    }

    @Override
    public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
        return true;
    }

    @Override
    public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
        if (item.hasTagCompound()) {
            fakeTileEntity.playerProfile = NBTUtil.func_152459_a(item.getTagCompound().getCompoundTag("PlayerProfile"));
        }
        else {
            fakeTileEntity.playerProfile = null;
        }

        switch (type) {
            case INVENTORY:
                GL11.glScalef(0.65f, 0.65f, 0.65f);
                fakeTileEntity.blockMetadata = 2;
                rugRenderer.renderTileEntityAt(fakeTileEntity, 0, 0, 0, 0);
                break;
            case EQUIPPED:
                fakeTileEntity.blockMetadata = 3;
                rugRenderer.renderTileEntityAt(fakeTileEntity, 0.25f, 0.25f, 0.25f, 0);
                break;
            case EQUIPPED_FIRST_PERSON:
                fakeTileEntity.blockMetadata = 0;
                rugRenderer.renderTileEntityAt(fakeTileEntity, 0.25f, 0.5f, 0.25f, 0);
                break;
            default:
                fakeTileEntity.blockMetadata = 0;
                rugRenderer.renderTileEntityAt(fakeTileEntity, -0.5f, 0f, -0.5f, 0);
        }
    }
}

{'fraction_non_alphanumeric': 0.08527715073990469, 'fraction_numerical': 0.026837220968146475, 'mean_word_length': 2.4056362083689153, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4824574', 'n_tokens_mistral': 1279, 'n_tokens_neox': 1168, 'n_words': 222}