<commit_before>package openccsensors.client.renderer.tileentity;

import openccsensors.client.model.ModelSensor;
import openccsensors.common.tileentity.TileEntitySensor;

import org.lwjgl.opengl.GL11;

import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon;

public class TileEntitySensorRenderer extends TileEntitySpecialRenderer  {

	private ModelSensor modelSensor = new ModelSensor();
    
	@Override
	public void renderTileEntityAt(TileEntity tileEntity, double x, double y,
			double z, float partialTick) {
		
		TileEntitySensor sensor = (TileEntitySensor) tileEntity;
		GL11.glPushMatrix();
		GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F);
		this.bindTextureByName("/mods/OpenCCSensors/textures/models/sensor.png");
		GL11.glPushMatrix();
		int placing = sensor.getFacing() * 90;
		int rotation = (int) sensor.getRotation();
		this.modelSensor.renderSensor(rotation);
		ItemStack s = new ItemStack(Item.redstone);
		Icon icon = s.getIconIndex();

        float f = icon.func_94209_e();
        float f1 = icon.func_94212_f();
        float f2 = icon.func_94206_g();
        float f3 = icon.func_94210_h();
		ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.func_94213_j(), icon.func_94208_k(), 0.0625F);
		GL11.glPopMatrix();
		GL11.glRotatef(placing, 0, 1, 0);
		GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
		GL11.glPopMatrix();
	}
<commit_msg>I fixed stuff over lunch..<commit_after>package openccsensors.client.renderer.tileentity;

import openccsensors.client.model.ModelSensor;
import openccsensors.common.item.ItemSensorCard;
import openccsensors.common.tileentity.TileEntitySensor;

import org.lwjgl.opengl.GL11;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.RenderEngine;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.Icon;
import net.minecraftforge.client.ForgeHooksClient;

public class TileEntitySensorRenderer extends TileEntitySpecialRenderer {

	private ModelSensor modelSensor = new ModelSensor();
	RenderItem renderItem;

	@Override
	public void renderTileEntityAt(TileEntity tileEntity, double x, double y,
			double z, float partialTick) {

		TileEntitySensor sensor = (TileEntitySensor) tileEntity;
		GL11.glPushMatrix();
			GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F);
			this.bindTextureByName("/mods/OpenCCSensors/textures/models/sensor.png");
			int rotation = (int) sensor.getRotation();
			GL11.glPushMatrix();
			this.modelSensor.renderSensor(rotation);
			ItemStack sensorCardStack = sensor.getSensorCardStack();
			int placing = sensor.getFacing() * 90;
			GL11.glPopMatrix();
			GL11.glRotatef(placing, 0, 1, 0);
			if (sensorCardStack != null && sensorCardStack.getItem() instanceof ItemSensorCard) {

				GL11.glScalef(0.02f, 0.02f, 0.02f);
				GL11.glRotatef(90.0F, 1, 0, 0);
				GL11.glTranslatef(-8.0f, 4.0f, 12.0f);
				renderItem = ((RenderItem) RenderManager.instance.getEntityClassRenderObject(EntityItem.class));
			    RenderEngine re = Minecraft.getMinecraft().renderEngine;
			    FontRenderer fr = getFontRenderer();
				renderItem.renderItemIntoGUI(fr, re, sensorCardStack, 0, 0);

			}
				
			GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
		GL11.glPopMatrix();
		
	}

{'fraction_non_alphanumeric': 0.11690821256038647, 'fraction_numerical': 0.034782608695652174, 'mean_word_length': 5.143916913946588, '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': '7592118', 'n_tokens_mistral': 1517, 'n_tokens_neox': 1415, 'n_words': 250}