package shadersmod.transform;

import static shadersmod.transform.Names.entityDragon_;
import static shadersmod.transform.Names.entityEnderman_;
import static shadersmod.transform.Names.entitySpider_;
import static shadersmod.transform.Names.layerDragonEyes_;
import static shadersmod.transform.Names.layerEndermanEyes_;
import static shadersmod.transform.Names.layerSpiderEyes_;
import static shadersmod.transform.Names.worldRenderer_;
import shadersmod.transform.Names.Clas;

public class Names {
	
	public static class Name {
		String clasName;
		String name;
		String desc;
		Clas   clasRef;
		public Name(String clasName, String name, String desc) {
			this.clasName = clasName;
			this.name = name;
			this.desc = desc;
		}
		public Name(Clas clasRef, String name, String desc) {
			this.clasName = clasRef.name;
			this.name = name;
			this.desc = desc;
			this.clasRef = clasRef;
		}
		public boolean equals(String clas, String name, String desc) {
			return this.clasName.equals(clas) && this.name.equals(name) && this.desc.equals(desc);
		}
	}
	
	public static class Type extends Name {
		public Type(String desc) {
			super("","",desc);
		}
		public Type(String name, String desc) {
			super(name,name,desc);
		}
	}
	public static class Clas extends Type {
		public Clas(String name) {
			super(name,"L"+name+";");
		}
		public boolean equals(String clas) {
			return this.clasName.equals(clas);
		}
	}
	public static class Fiel extends Name {
		public Fiel(Clas clas, String name, String desc) {
			super(clas,name,desc);
		}
		public boolean equals(String clas, String name) {
			return this.clasName.equals(clas) && this.name.equals(name);
		}
	}
	public static class Meth extends Name {
		public Meth(Clas clas, String name, String desc) {
			super(clas,name,desc);
		}
		public boolean equalsNameDesc(String name, String desc) {
			return this.name.equals(name) && this.desc.equals(desc);
		}
	}

	static String badName = "";
	
	static Clas block_;
	static Clas blockFlowerPot_;
	static Clas minecraft_;
	static Clas guiButton_;
	static Clas guiOptions_;
	static Clas guiScreen_;
	static Clas modelRenderer_;
	static Clas texturedQuad_;
	static Clas worldClient_;
	static Clas effectRenderer_;
	static Clas entityRenderer_;
	static Clas glAllocation_;
	static Clas glStateManager_;
	static Clas itemRenderer_;
	static Clas openGlHelper_;
	static Clas renderBlocks_;
	static Clas renderGlobal_;
	static Clas tessellator_;
	static Clas worldRenderer_;
	static Clas vertexUploader_;
	static Clas frustum_;
	static Clas iCamera_;
	static Clas render_;
	static Clas layerDragonEyes_;
	static Clas layerEndermanEyes_;
	static Clas layerSpiderEyes_;
	static Clas renderManager_;
	static Clas rendererLivingE_;
	static Clas renderItemFrame_;
	static Clas abstractTexture_;
	static Clas dynamicTexture_;
	static Clas iTextureObject_;
	static Clas layeredTexture_;
	static Clas simpleTexture_;
	static Clas stitcher_;
	static Clas animationMetadataSection_;
	static Clas textureAtlasSpri_;
	static Clas textureClock_;
	static Clas textureCompass_;
	static Clas textureManager_;
	static Clas textureMap_;
	static Clas textureUtil_;
	static Clas textureDownload_;
	static Clas iResource_;
	static Clas iResourceManager_;
	static Clas gameSettings_;
	static Clas tessVertexState_;
	static Clas entity_;
	static Clas entityItemFrame_;
	static Clas entityLivingBase_;
	static Clas entityDragon_;
	static Clas entityEnderman_;
	static Clas entitySpider_;
	static Clas entityPlayer_;
	static Clas item_;
	static Clas itemBlock_;
	static Clas itemStack_;
	static Clas movingObjectPos_;
	static Clas resourceLocation_;
	static Clas vec3_;
	static Clas iBlockAccess_;
	static Clas world_;
	static Clas enumWorldBlockLayer_;

	static Fiel abstractTexture_glTextureId;
	static Fiel entityLivingBase_deathTime;
	static Fiel entityLivingBase_hurtTime;
	static Fiel entityRenderer_cameraZoom;
	static Fiel entityRenderer_mc;
	static Fiel entityRenderer_shouldRenderHand;
	static Fiel gameSettings_renderDistance;
	static Fiel guiButton_id;
	static Fiel guiScreen_buttonList;
	static Fiel guiScreen_width;
	static Fiel guiScreen_height;
	static Fiel guiScreen_mc;
	static Fiel guiOptions_options;
	static Fiel itemBlock_block;
	static Fiel itemRenderer_itemToRender;
	static Fiel layeredTexture_layeredTextureNames;
	static Fiel minecraft_renderGlobal;
	static Fiel minecraft_gameSettings;
	static Fiel modelRenderer_displayList;
	static Fiel modelRenderer_compiled;
	static Fiel renderGlobal_glSkyList;
	static Fiel renderGlobal_worldRenderers;
	static Fiel rendererLivingE_mainModel;
	static Fiel rendererLivingE_renderPassModel;
	static Fiel renderManager_entityRenderMap;
	static Fiel renderManager_instance;
	static Fiel simpleTexture_textureLocation;
	static Fiel tessellator_floatBuffer;
	static Fiel tessellator_shortBuffer;
	static Fiel tessellator_intBuffer;
	static Fiel tessellator_byteBuffer;
	static Fiel tessellator_rawBuffer;
	static Fiel tessellator_vertexCount;
	static Fiel tessellator_hasNormals;
	static Fiel textureAtlasSpri_width;
	static Fiel textureAtlasSpri_height;
	static Fiel textureAtlasSpri_border;
	static Fiel textureMap_anisotropic;
	static Fiel textureDownload_textureUploaded;
	static Fiel vec3_xCoord;

	static Fiel guiOptions_buttonList;
	static Fiel guiOptions_width;
	static Fiel guiOptions_height;
	static Fiel guiOptions_mc;

	static Meth abstractTexture_deleteGlTexture;
	static Meth block_getAoLight;
	static Meth block_getBlockFromItem;
	static Meth dynamicTexture_updateDynamicTexture;
	static Meth effectRenderer_renderLitParticles;
	static Meth effectRenderer_renderParticles;
	static Meth entity_getBrightness;
	static Meth entityRenderer_enableLightmap;
	static Meth entityRenderer_getMouseOver;
	static Meth entityRenderer_updateFogColor;
	static Meth entityRenderer_setupFog;
	static Meth entityRenderer_setFogColorBuffer;
	static Meth entityRenderer_renderWorld;
	static Meth entityRenderer_renderWorldPass;
	static Meth entityRenderer_renderRainSnow;
	static Meth entityRenderer_renderHand;
	static Meth entityRenderer_setupCameraTransform;
	static Meth entityRenderer_disableLightmap;
	static Meth entityRenderer_renderCloudsCheck;
	static Meth gameSettings_saveOptions;
	static Meth gameSettings_shouldRenderClouds;
	static Meth glAllocation_createDirectByteBuffer;
	static Meth glAllocation_createDirectIntBuffer;
	static Meth glAllocation_deleteDisplayLists;
	static Meth glAllocation_generateDisplayLists;
	static Meth glStateManager_clear;
	static Meth glStateManager_clearColor;
	static Meth glStateManager_viewport;
	static Meth glStateManager_setFog;
	static Meth glStateManager_depthMask;
	static Meth glStateManager_pushMatrix;
	static Meth glStateManager_popMatrix;
	static Meth glStateManager_enableFog;
	static Meth glStateManager_disableFog;
	static Meth glStateManager_enableTexture2D;
	static Meth glStateManager_disableTexture2D;
	static Meth glStateManager_color3;
	static Meth glStateManager_color4;
	static Meth glStateManager_rotate;
	static Meth guiOptions_actionPerformed;
	static Meth guiOptions_initGui;
	static Meth iCamera_setPosition;
	static Meth iResourceManager_getResource;
	static Meth itemRenderer_renderItem;
	static Meth itemRenderer_renderItemInFirstPerson;
	static Meth itemRenderer_renderOverlays;
	static Meth itemRenderer_updateEquipped;
	static Meth iTextureObject_loadTexture;
	static Meth iTextureObject_getGlTextureId;
	static Meth minecraft_displayGuiScreen;
	static Meth minecraft_startGame;
	static Meth openGlHelper_setActiveTexture;
	static Meth render_renderShadow;
	static Meth renderBlocks_renderBlockFluids;
	static Meth renderBlocks_renderStdBlockWithCM;
	static Meth renderBlocks_renderBlockSandFalling;
	static Meth renderBlocks_renderStdBlockWithAO;
	static Meth renderBlocks_renderBlockCactusImpl;
	static Meth renderBlocks_renderBlockDoor;
	static Meth renderBlocks_renderBlockBed;
	static Meth renderBlocks_renderBlockByRenderType;
	static Meth renderBlocks_renderBlockFlowerPot;
	static Meth renderBlocks_renderStdBlockWithAOP;
	static Meth renderBlocks_renderPistonExtension;
	static Meth renderItemFrame_renderItemInFrame;
	static Meth layerDragonEyes_render;
	static Meth layerEndermanEyes_render;
	static Meth layerSpiderEyes_render;
	static Meth rendererLivingE_doRender;
	static Meth rendererLivingE_renderEquippedItems;
	static Meth rendererLivingE_getColorMultiplier;
	static Meth rendererLivingE_renderLabel;
	static Meth renderManager_renderEntitySimple;
	static Meth renderManager_renderWitherSkull;
	static Meth renderGlobal_renderEntities;
	static Meth renderGlobal_renderSky;
	static Meth renderGlobal_preRenderBlockDamage;
	static Meth renderGlobal_postRenderBlockDamage;
	static Meth renderGlobal_renderClouds;
	static Meth renderGlobal_sortAndRender;
	static Meth renderGlobal_setupTerrain;
	static Meth renderGlobal_updateChunks;
	static Meth renderGlobal_renderBlockLayer1;
	static Meth renderGlobal_renderBlockLayer4;
	static Meth renderGlobal_drawSelectionBox;
	static Meth renderGlobal_renderAllRenderLists;
	static Meth stitcher_getCurrentWidth;
	static Meth tessellator_sortQuad;
	static Meth tessellator_addTranslation;
	static Meth tessellator_setNormal;
	static Meth tessellator_addVertex;
	static Meth tessellator_reset;
	static Meth tessellator_draw;
	static Meth texturedQuad_draw;
	static Meth worldRenderer_startQuads;
	static Meth vertexUploader_draw;
	static Meth textureAtlasSpri_loadSprite;
	static Meth textureAtlasSpri_getFrameTextureData;
	static Meth textureAtlasSpri_prepareAF;
	static Meth textureAtlasSpri_getIconName;
	static Meth textureAtlasSpri_updateAnimation;
	static Meth textureCompass_updateCompass;
	static Meth textureManager_onResourceManagerReload;
	static Meth textureManager_bindTexture;
	static Meth textureMap_loadTextureAtlas;
	static Meth textureMap_getIconResLoc;
	static Meth textureMap_updateAnimations;
	static Meth textureUtil_uploadTexture;
	static Meth textureUtil_uploadTextureImageAllocate;
	static Meth textureUtil_allocateTexture;
	static Meth textureUtil_allocateTextureMipmap;
	static Meth textureUtil_uploadTexSub;
	static Meth textureUtil_bindTexture;
	static Meth world_getCelestialAngle;
	static Meth world_getRainStrength;
	static Meth modelRenderer_render;
	static Meth modelRenderer_renderWithRotation;
	static Meth modelRenderer_compileDisplayList;

	static Meth frustrum_setPosition;
	static Meth worldClient_getCelestialAngle;
	static Meth worldClient_getRainStrength;

	static Clas blockModelRenderer_;
	static Clas blockFluidRenderer_;
	static Clas blockRendererDispatcher_;
	static Clas breakingFour_;
	static Clas faceBakery_;
	static Clas defVertexFormat_;
	static Clas iBlockState_;
	static Clas blockPos_;
	static Clas vertexFormat_;
	static Clas renderChunk_;
	static Clas chunkRenderContainer_;
	static Clas regionRenderCacheBuilder_;
	static Clas vboRenderList_;
	static Clas enumFacing_;
	static Clas iBakedModel_;
	static Clas blockPartFace_;
	static Clas modelRotation_;
	static Clas blockPartRotation_;
	static Clas blockFaceUV_;
	static Clas chunkCompileTaskGenerator_;
	static Clas compiledChunk_;
	static Clas tileEntityBeacon_;
	static Clas tileEntityBeaconRenderer_;
	static Clas clippingHelper_;
	
	static Fiel defVertexFormat_block;
	static Fiel defVertexFormat_item;
	
	static Meth blockModelRenderer_fillQuadBounds;
	static Meth blockRendererDispatcher_renderBlock;
	static Meth blockFluidRenderer_renderFluid;
	static Meth blockModelRenderer_renderModel;
	static Meth breakingFour_fillVertexUV;
	static Meth faceBakery_makeQuadVertexData;
	static Meth faceBakery_makeQuadVertexDataForge;
	static Meth faceBakery_storeVertexData;
	static Meth faceBakery_getFacingFromVertexData;
	static Meth faceBakery_func_178408;
	static Meth faceBakery_func_178401;
	static Meth renderChunk_rebuildChunk;
	static Meth renderChunk_postRenderBlocks;
	static Meth regionRenderCacheBuilder_getWorldRendererByLayer;
	static Meth chunkRenderContainer_renderChunkLayer;
	static Meth vboRenderList_setupArrayPointers;
	static Meth worldRenderer_growBuffer;
	static Meth worldRenderer_setVertexFormat;
	static Meth worldRenderer_addVertexData;
	static Meth worldRenderer_addVertex;

	static Clas dummy_          = new Clas("shadersmod/client/Dummy");
	static Clas sVertexBuilder_ = new Clas("shadersmod/client/SVertexBuilder");
	static Clas multiTexID_     = new Clas("shadersmod/client/MultiTexID");
	static Clas chunkRenderDispatcher_;
	static Fiel entityRenderer_frameCount;
	static Fiel worldRenderer_rawIntBuffer;
	static Fiel worldRenderer_rawFloatBuffer;
	static Fiel worldRenderer_vertexCount;
	static Fiel worldRenderer_rawBufferIndex;
	static Fiel worldRenderer_drawMode;
	static Fiel worldRenderer_sVertexBuilder;
	static Fiel abstractTexture_multiTex;
	static Fiel textureMap_atlasWidth;
	static Fiel textureMap_atlasHeight;
	static Fiel renderGlobal_renderDispatcher;
	static Meth modelRenderer_resetDisplayList;
	static Meth iTextureObject_getMultiTexID;
	static Meth tileEntityBeaconRenderer_renderBeacon;

	// new
	static Clas connectedTextures_;
	static Meth connectedTextures_fixVertex;


	public static boolean equals(String clas1, String name1, String desc1, String clas2, String name2, String desc2) {
		return clas1.equals(clas2) && name1.equals(name2) && desc1.equals(desc2);
	}
	public static boolean equalsNameDesc(String name1, String desc1, String name2, String desc2) {
		return name1.equals(name2) && desc1.equals(desc2);
	}
}
