package wtf.proxy;


import java.util.List;

import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.client.resources.IResourcePack;
import net.minecraft.item.Item;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.relauncher.ReflectionHelper;
import wtf.Core;
import wtf.crafting.render.WCICTESR;
import wtf.crafting.render.WCICTileEntity;
import wtf.init.WTFBlocks;


public class ClientProxy extends CommonProxy {

		
	@Override
	public void enableBlockstateTexturePack(){
		//ReflectionHelper.<List<IResourcePack>>getPrivateValue(Minecraft.class, Minecraft.getMinecraft(), "defaultResourcePacks", "field_110449_ao").add(wtfResourcePack);
	}
	
	@Override
	public void registerItemSubblocksRenderer(Block block, int meta){
		for (int loop = 0; loop < meta+1; loop++){
			ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), loop, new ModelResourceLocation(block.getRegistryName().toString(), "inventory"+loop));	
		}	
	}
	@Override
	public void registerItemRenderer(Block block){
			ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName().toString(), "inventory"));	
	}
	
	@Override
	public void registerItemRenderer(Item item){
		ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName().toString()));
	}

	@Override
	public void initWCICRender(){
		 ClientRegistry.bindTileEntitySpecialRenderer(WCICTileEntity.class, new WCICTESR());
		 
	}




}

@@ -241,24 +241,87 @@
 ourcePack;%0D%0A
+import net.minecraft.client.resources.ResourcePackRepository;%0D%0A
 import net.m
@@ -341,16 +341,16 @@
 .Item;%0D%0A
-
 import n
@@ -766,10 +766,748 @@
 %0D%0A%09%09
-//
+ResourcePackRepository repo = Minecraft.getMinecraft().getResourcePackRepository();%0D%0A%09%09List%3CResourcePackRepository.Entry%3E rpEnabled = repo.getRepositoryEntries();%0D%0A%09%09ResourcePackRepository.Entry wtfResourcePack = null;%0D%0A%09%09for(ResourcePackRepository.Entry rp : repo.getRepositoryEntriesAll())%7B%0D%0A%09%09%09if(rp.getResourcePackName().equals(%22WTFOres%22))%7B%0D%0A%09%09%09%09wtfResourcePack = rp;%0D%0A%09%09%09%09break;%0D%0A%09%09%09%7D%0D%0A%09%09%7D%0D%0A%09%09// Choose which one you want and remove the other lines.%0D%0A%09%09%0D%0A%09%09// 2 Lines below enable resource pack, but it stays visible in RPs GUI and can be disabled by user.%0D%0A%09%09rpEnabled.add(wtfResourcePack);%0D%0A%09%09repo.setRepositories(rpEnabled);%0D%0A%0D%0A%09%09// A line below enables resource packs and hides it from RPs GUI making user unable to disable it.%0D%0A%09%09
 Refl
@@ -1539,16 +1539,27 @@
 rcePack%3E
+, Minecraft
 %3EgetPriv
@@ -1668,24 +1668,42 @@
 ResourcePack
+.getResourcePack()
 );%0D%0A%09%7D%0D%0A%09%0D%0A%09

Enable RP by default