/// <summary> /// Render this TileEntity at a given set of coordinates /// </summary> public virtual void RenderTileEntityAt(TileEntity par1TileEntity, float par2, float par4, float par6, float par8) { TileEntitySpecialRenderer tileentityspecialrenderer = GetSpecialRendererForEntity(par1TileEntity); if (tileentityspecialrenderer != null) { tileentityspecialrenderer.RenderTileEntityAt(par1TileEntity, par2, par4, par6, par8); } }
/// <summary> /// Returns the TileEntitySpecialRenderer used to render this TileEntity class, or null if it has no special renderer /// </summary> public virtual TileEntitySpecialRenderer GetSpecialRendererForClass(Type par1Class) { TileEntitySpecialRenderer tileentityspecialrenderer = (TileEntitySpecialRenderer)SpecialRendererMap[par1Class]; if (tileentityspecialrenderer == null && par1Class != (typeof(net.minecraft.src.TileEntity))) { tileentityspecialrenderer = GetSpecialRendererForClass(par1Class.BaseType); SpecialRendererMap[par1Class] = tileentityspecialrenderer; } return(tileentityspecialrenderer); }
/// <summary> /// Called from cacheActiveRenderInfo() to cache render-related references for TileEntitySpecialRenderers in /// specialRendererMap. Currently only the world reference from cacheActiveRenderInfo() is passed to this method. /// </summary> public virtual void CacheSpecialRenderInfo(World par1World) { WorldObj = par1World; IEnumerator <TileEntitySpecialRenderer> iterator = SpecialRendererMap.Values.GetEnumerator(); do { if (!iterator.MoveNext()) { break; } TileEntitySpecialRenderer tileentityspecialrenderer = iterator.Current; if (tileentityspecialrenderer != null) { tileentityspecialrenderer.CacheSpecialRenderInfo(par1World); } }while (true); }