<commit_before>package net.cortexmodders.atomtech.client.render.tileentity;

import net.cortexmodders.atomtech.client.model.tileentity.ModelSmallBattery;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;

import org.lwjgl.opengl.GL11;


public class RenderSmallBattery extends TileEntitySpecialRenderer
{
    
    ModelSmallBattery model;
    
    private static final ResourceLocation texture = new ResourceLocation("atomtech", "textures/models/small_battery.png");
    
    public RenderSmallBattery()
    {
        model = new ModelSmallBattery();
    }
    
    @Override
    public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float delta)
    {
        this.bindTexture(texture);
        int meta = tile.worldObj.getBlockMetadata(tile.xCoord, tile.yCoord, tile.zCoord);
        
        GL11.glPushMatrix();
        {
            GL11.glTranslated(x, y, z);
            GL11.glTranslatef(0.5F, 0.0F, 0.5F);
            GL11.glRotatef(-90 * meta, 0F, 1F, 0F);
            GL11.glScalef(-1F, -1F, 1F);
            
            model.render(0.0625F);
        }
        GL11.glPopMatrix();
    }
    
}<commit_msg>added renderinghandler for inventory rendering.<commit_after>package net.cortexmodders.atomtech.client.render.tileentity;

import net.cortexmodders.atomtech.client.model.tileentity.ModelSmallBattery;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.IBlockAccess;

import org.lwjgl.opengl.GL11;

import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;

public class RenderSmallBattery extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler
{
    
    ModelSmallBattery model;
    
    private static final ResourceLocation texture = new ResourceLocation("atomtech", "textures/models/small_battery.png");
    
    public RenderSmallBattery()
    {
        model = new ModelSmallBattery();
    }
    
    @Override
    public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float delta)
    {
        this.bindTexture(texture);
        int meta = tile.worldObj.getBlockMetadata(tile.xCoord, tile.yCoord, tile.zCoord);
        
        GL11.glPushMatrix();
        {
            GL11.glTranslated(x, y, z);
            GL11.glTranslatef(0.5F, 0.0F, 0.5F);
            GL11.glRotatef(-90 * meta, 0F, 1F, 0F);
            GL11.glScalef(-1F, -1F, 1F);
            
            model.render(0.0625F);
        }
        GL11.glPopMatrix();
    }

    @Override
    public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer)
    {
        // TODO Auto-generated method stub
        
    }

    @Override
    public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer)
    {
        return false;
    }

    @Override
    public boolean shouldRender3DInInventory()
    {
        return true;
    }

    @Override
    public int getRenderId()
    {
        return 0;
    }
    
}
{'fraction_non_alphanumeric': 0.09427099120945741, 'fraction_numerical': 0.020612306759624128, 'mean_word_length': 2.8461538461538463, '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': '7492149', 'n_tokens_mistral': 1045, 'n_tokens_neox': 1017, 'n_words': 196}