Ejemplo n.º 1
0
        private void LoadTexturePacks()
        {
            // We load the default texture pack specially.
            _texturePacks.Add(TexturePack.Default);
            AddTexturePackRow(TexturePack.Default);

            // Make sure to create the texture pack directory if there is none.
            if (!Directory.Exists(TexturePack.TexturePackPath))
                Directory.CreateDirectory(TexturePack.TexturePackPath);

            var zips = Directory.EnumerateFiles(TexturePack.TexturePackPath);
            bool officialPresent = false;
            foreach (var zip in zips)
            {
                if (!zip.EndsWith(".zip"))
                    continue;
                if (Path.GetFileName(zip) == "Minecraft.zip")
                    officialPresent = true;

                var texturePack = TexturePack.FromArchive(zip);
                if (texturePack != null)
                {
                    _texturePacks.Add(texturePack);
                    AddTexturePackRow(texturePack);
                }
            }
            if (!officialPresent)
                OfficialAssetsButton.Visible = true;
        }
Ejemplo n.º 2
0
        internal void DownloadTexturePack(string url)
        {
            if (game.DeniedUrls.Has(url))
            {
                return;
            }
            string   path = TextureCache.MakePath(url), etag = null;
            DateTime lastModified = DateTime.MinValue;

            if (File.Exists(path))
            {
                lastModified = TextureCache.GetLastModified(url, path, game.LastModified);
                etag         = TextureCache.GetETag(url, path, game.ETags);
            }

            TexturePack.ExtractCurrent(game, url);
            if (url.Contains(".zip"))
            {
                game.Downloader.AsyncGetData(url, true, "texturePack", lastModified, etag);
            }
            else
            {
                game.Downloader.AsyncGetImage(url, true, "terrain", lastModified, etag);
            }
        }
Ejemplo n.º 3
0
 private void instanciateTextures(TexturePack texture)
 {
     //Instanciate all textures from the choosen texture pack:
     floor              = texture.getFloorPrefab();
     destructibleWall   = texture.getDestructibleWallPrefab();
     indestructibleWall = texture.getIndestructibleWallPrefab();
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Create a <see cref="TexturePackResource"/> object based on a <see cref="TexturePack"/> instance.
 /// </summary>
 /// <param name="tpk"></param>
 /// <returns>The new resource.</returns>
 public static TexturePackResource CreateTexturePackResource(TexturePack tpk)
 {
     return(new TexturePackResource(tpk.Name)
     {
         Name = tpk.Path
     });
 }
Ejemplo n.º 5
0
        static void SetMipmaps(Game g, string v)
        {
            g.Graphics.Mipmaps = SetBool(v, OptionsKey.Mipmaps);

            string url = g.World.TextureUrl;

            if (url == null)
            {
                TexturePack.ExtractDefault(g); return;
            }

            using (Stream data = TextureCache.GetStream(url)) {
                if (data == null)
                {
                    TexturePack.ExtractDefault(g); return;
                }

                if (url.Contains(".zip"))
                {
                    TexturePack extractor = new TexturePack();
                    extractor.Extract(data, g);
                }
                else
                {
                    TexturePack.ExtractTerrainPng(g, data, url);
                }
            }
        }
Ejemplo n.º 6
0
 public Sprite(Game game, TexturePack pack)
     : base(game)
 {
     //animation
     framesList  = pack.Frames;
     texture     = framesList[0];
     frameNumber = 0;
     framesCount = framesList.Count - 1;
     counter     = 0;
     //size
     bounds = new Rectangle(0, 0, texture.Width, texture.Height);
     //defaults
     sourceRectangle = new Rectangle(0, 0, Width, Height);
     CollisionTile   = sourceRectangle;
     Visible         = true;
     //
     AnimationSpeed = 0;
     GenerateEvents = true;
     GenerateFrameOfInterestEvent = false;
     FrameOfInterest = 0;
     Game.Components.Add(this);
     StackOrder = 0;
     DrawOrder  = 0;
     IsVisible  = true;
 }
Ejemplo n.º 7
0
    private void updateTextures()
    {
        //On récupère le texture pack selectionné:
        TexturePack selectedTexturePack = textureDictionary[selectedTexture];

        //On affiche le nom du pack texture selectionné dans l'UI:
        textureNameUI.text = selectedTexturePack.getTextureName();


        //On affiche la preview des prefabs du texture pack selectionné:
        Sprite floorSprite              = getAssetFromGameObject(selectedTexturePack.getFloorPrefab());
        Sprite destructibleWallSprite   = getAssetFromGameObject(selectedTexturePack.getDestructibleWallPrefab());
        Sprite indestructibleWallSprite = getAssetFromGameObject(selectedTexturePack.getIndestructibleWallPrefab());

        if (floorSprite != null)
        {
            textureFloorPreviewUI.sprite = floorSprite;
        }

        if (destructibleWallSprite != null)
        {
            textureDestructibleWallPreviewUI.sprite = destructibleWallSprite;
        }

        if (indestructibleWallSprite != null)
        {
            textureIndestructibleWallPreviewUI.sprite = indestructibleWallSprite;
        }
    }
Ejemplo n.º 8
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="texturePack"></param>
        public void AddTexturePack(TexturePack texturePack)
        {
            if (texturePack == null)
            {
                return;
            }

            // Make sure to 'silence' errors loading custom texture packs;
            // they're unimportant as we can just use default textures.
            try
            {
                var archive = new ZipFile(Path.Combine(TexturePack.TexturePackPath, texturePack.Name));
                foreach (var entry in archive.Entries)
                {
                    var key = entry.FileName;
                    if (Path.GetExtension(key) == ".png")
                    {
                        using (var stream = entry.OpenReader())
                        {
                            try
                            {
                                using (var ms = new MemoryStream())
                                {
                                    CopyStream(stream, ms);
                                    ms.Seek(0, SeekOrigin.Begin);
                                    AddTexture(key, new PngReader().Read(ms, Device));
                                }
                            }
                            catch (Exception ex) { Console.WriteLine("Exception occured while loading {0} from texture pack:\n\n{1}", key, ex); }
                        }
                    }
                }
            }
            catch { return; }
        }
Ejemplo n.º 9
0
        private void AddTexturePackRow(TexturePack pack)
        {
            var row = TexturePackStore.AddRow();

            TexturePackStore.SetValue(row, TexturePackImageField, Image.FromStream(pack.Image).WithSize(IconSize.Medium));
            TexturePackStore.SetValue(row, TexturePackTextField, pack.Name + "\r\n" + pack.Description);
        }
Ejemplo n.º 10
0
    public void launchLevel(string mapFilePath, TexturePack texturePack)
    {
        //Instancie les textures à utiliser:
        instanciateTextures(texturePack);

        //Crée la carte:
        createMap(mapFilePath);
    }
Ejemplo n.º 11
0
 public ModelPack()
 {
     Info        = new ModelPackInfo();
     TexturePack = new TexturePack();
     Effects     = new List <Resource>();
     Models      = new List <Model>();
     MotionPacks = new List <MotionPack>();
 }
Ejemplo n.º 12
0
        void LoadMap(string path)
        {
            IMapFormatImporter importer = null;

            if (path.EndsWith(".dat"))
            {
                importer = new MapDatImporter();
            }
            else if (path.EndsWith(".fcm"))
            {
                importer = new MapFcm3Importer();
            }
            else if (path.EndsWith(".cw"))
            {
                importer = new MapCwImporter();
            }
            else if (path.EndsWith(".lvl"))
            {
                importer = new MapLvlImporter();
            }

            try {
                using (FileStream fs = File.OpenRead(path)) {
                    int width, height, length;
                    game.World.Reset();
                    game.WorldEvents.RaiseOnNewMap();

                    if (game.World.TextureUrl != null)
                    {
                        TexturePack.ExtractDefault(game);
                        game.World.TextureUrl = null;
                    }
                    BlockInfo.Reset(game);
                    game.Inventory.SetDefaultMapping();

                    byte[] blocks = importer.Load(fs, game, out width, out height, out length);
                                        #if USE16_BIT
                    game.World.SetNewMap(Utils.UInt8sToUInt16s(blocks), width, height, length);
                                        #else
                    game.World.SetNewMap(blocks, width, height, length);
                                        #endif

                    game.WorldEvents.RaiseOnNewMapLoaded();
                    if (game.UseServerTextures && game.World.TextureUrl != null)
                    {
                        game.Server.RetrieveTexturePack(game.World.TextureUrl);
                    }

                    LocalPlayer    p      = game.LocalPlayer;
                    LocationUpdate update = LocationUpdate.MakePosAndOri(p.Spawn, p.SpawnRotY, p.SpawnHeadX, false);
                    p.SetLocation(update, false);
                }
            } catch (Exception ex) {
                ErrorHandler.LogError("loading map", ex);
                string file = Path.GetFileName(path);
                game.Chat.Add("&eFailed to load map \"" + file + "\"");
            }
        }
Ejemplo n.º 13
0
 private void loadTextures()
 {
     for (int i = 0; i < floors.Length; i++)
     {
         TexturePack texturePack = new TexturePack("PackTexture" + i, floors[i], destructibleWalls[i], indestructibleWalls[i]);
         textureDictionary.Add(i, texturePack);
         numberOfTexturesDetected++;
     }
 }
Ejemplo n.º 14
0
        private void DumpTextures(TexturePack texturePack, String outputDirectory)
        {
            Console.WriteLine("Dumping textures to " + outputDirectory);

            XmlWriterSettings xmlSettings = new XmlWriterSettings
            {
                CloseOutput         = true,
                Encoding            = Encoding.UTF8,
                Indent              = true,
                NewLineOnAttributes = false,
                OmitXmlDeclaration  = false
            };

            using (XmlWriter xml = XmlWriter.Create(outputDirectory + "\\_textures.xml", xmlSettings))
            {
                xml.WriteStartDocument();
                xml.WriteStartElement("TexturePack", NAMESPACE);

                xml.WriteStartElement("Palette", NAMESPACE);
                for (int i = 0; i < TexturePack.PALETTE_ENTRIES; i++)
                {
                    xml.WriteStartElement("Entry", NAMESPACE);
                    xml.WriteAttributeString("Index", i.ToString());
                    xml.WriteAttributeString("Red", texturePack.Palette[i].R.ToString());
                    xml.WriteAttributeString("Green", texturePack.Palette[i].G.ToString());
                    xml.WriteAttributeString("Blue", texturePack.Palette[i].B.ToString());
                    xml.WriteEndElement();
                }
                xml.WriteEndElement();

                xml.WriteStartElement("Textures", NAMESPACE);
                foreach (var texture in texturePack.Textures)
                {
                    xml.WriteStartElement("Texture", NAMESPACE);
                    xml.WriteAttributeString("Name", texture.Name);
                    xml.WriteAttributeString("HasTransparency", texture.HasTransparency.ToString());
                    foreach (var mipmap in texture.Mipmaps)
                    {
                        xml.WriteStartElement("MipMap", NAMESPACE);
                        xml.WriteAttributeString("Level", mipmap.Level.ToString());
                        xml.WriteAttributeString("Width", mipmap.ImageDimensions.Width.ToString());
                        xml.WriteAttributeString("Height", mipmap.ImageDimensions.Height.ToString());
                        xml.WriteAttributeString("Data", string.Format("{0}_MIPMAP_{1}.gif", texture.Name, mipmap.Level));
                        xml.WriteEndElement();
                    }
                    xml.WriteEndElement();
                }
                xml.WriteEndElement();
                xml.Close();
            }

            foreach (var texture in texturePack.Textures)
            {
                DumpTexture(texturePack, texture, OutputDirectory);
            }
        }
Ejemplo n.º 15
0
        public override TexturePack ReadTexturePack(BinaryReader br, uint containerSize)
        {
            _texturePack = new TexturePack();
            _offset      = (uint)(br.BaseStream.Position - 8);
            _size        = containerSize + 8;

            ReadChunks(br, containerSize);

            return(_texturePack);
        }
Ejemplo n.º 16
0
		void HandleSetMapEnvUrl() {
			string url = reader.ReadString();
			if (!game.UseServerTextures) return;
			
			if (url == "") {
				if (game.World.TextureUrl != null) TexturePack.ExtractDefault(game);
			} else if (Utils.IsUrlPrefix(url, 0)) {
				net.RetrieveTexturePack(url);
			}
			Utils.LogDebug("Image url: " + url);
		}
Ejemplo n.º 17
0
        static void SetMipmaps(Game g, string v)
        {
            g.Graphics.Mipmaps = SetBool(v, OptionsKey.Mipmaps);

            string url = g.World.TextureUrl;

            // always force a reload from cache
            g.World.TextureUrl = "~`#$_^*()@";
            TexturePack.ExtractCurrent(g, url);
            g.World.TextureUrl = url;
        }
Ejemplo n.º 18
0
        void ExtractInitialTexturePack()
        {
            defTexturePack = Options.Get(OptionsKey.DefaultTexturePack) ?? "default.zip";
            TexturePack extractor = new TexturePack();

            extractor.Extract("default.zip", this);
            // in case the user's default texture pack doesn't have all required textures
            if (DefaultTexturePack != "default.zip")
            {
                extractor.Extract(DefaultTexturePack, this);
            }
        }
Ejemplo n.º 19
0
        public DungeonTileSet(IContentLoader <TRawTexture> loader,
                              ITileProducer <TTile, TTexture, TRawTexture> producer)
        {
            this.loader   = loader;
            this.producer = producer;

            TileSize = new IntDimension(50, 24);
            tp       = new TexturePack <TTile>("default",
                                               TileSize,
                                               TextureType.Isometric,
                                               LoadDecorations().ToArray());
        }
Ejemplo n.º 20
0
        void ExtractInitialTexturePack()
        {
            defTexturePack = Options.Get(OptionsKey.DefaultTexturePack, "default.zip");
            TexturePack.ExtractZip("default.zip", this);

            // in case the user's default texture pack doesn't have all required textures
            string texPack = DefaultTexturePack;

            if (!Utils.CaselessEq(texPack, "default.zip"))
            {
                TexturePack.ExtractZip(texPack, this);
            }
        }
        protected void CheckAsyncResources()
        {
            DownloadedItem item;

            if (game.AsyncDownloader.TryGetItem("terrain", out item))
            {
                TexturePack.ExtractTerrainPng(game, item);
            }
            if (game.AsyncDownloader.TryGetItem("texturePack", out item))
            {
                TexturePack.ExtractTexturePack(game, item);
            }
        }
Ejemplo n.º 22
0
        public void Disconnect(string title, string reason)
        {
            Events.RaiseDisconnected(title, reason);

            Gui.Reset(this);
            World.Reset();
            World.blocks = null;
            Drawer2D.InitColours();
            BlockInfo.Reset(this);
            TexturePack.ExtractDefault(this);
            Gui.SetNewScreen(new ErrorScreen(this, title, reason));
            GC.Collect();
        }
Ejemplo n.º 23
0
        internal static void LoadMap(Game game, string path)
        {
            game.World.Reset();
            Events.RaiseOnNewMap();

            if (game.World.TextureUrl != null)
            {
                TexturePack.ExtractDefault(game);
                game.World.TextureUrl = null;
            }
            BlockInfo.Reset();
            game.Inventory.SetDefaultMapping();

            int width, height, length;

            byte[] blocks;
            try {
                using (Stream fs = Platform.FileOpen(path)) {
                    IMapFormatImporter importer = null;
                    if (path.EndsWith(".dat"))
                    {
                        importer = new MapDatImporter();
                    }
                    else if (path.EndsWith(".fcm"))
                    {
                        importer = new MapFcm3Importer();
                    }
                    else if (path.EndsWith(".cw"))
                    {
                        importer = new MapCwImporter();
                    }
                    else if (path.EndsWith(".lvl"))
                    {
                        importer = new MapLvlImporter();
                    }
                    blocks = importer.Load(fs, game, out width, out height, out length);
                }
            } catch (Exception ex) {
                ErrorHandler.LogError("loading map", ex);
                game.Chat.Add("&eFailed to load map \"" + path + "\"");
                return;
            }

            game.World.SetNewMap(blocks, width, height, length);
            Events.RaiseOnNewMapLoaded();

            LocalPlayer    p      = game.LocalPlayer;
            LocationUpdate update = LocationUpdate.MakePosAndOri(p.Spawn, p.SpawnRotY, p.SpawnHeadX, false);

            p.SetLocation(update, false);
        }
Ejemplo n.º 24
0
        void OfficialAssetsButton_Clicked(object sender, EventArgs e)
        {
            var result = MessageDialog.AskQuestion("Download Mojang assets",
                                                   "This will download the official Minecraft assets from Mojang.\n\n" +
                                                   "By proceeding you agree to the Mojang asset guidelines:\n\n" +
                                                   "https://account.mojang.com/terms#brand\n\n" +
                                                   "Proceed?",
                                                   Command.Yes, Command.No);

            if (result == Command.Yes)
            {
                OfficialAssetsButton.Visible   = false;
                OfficialAssetsProgress.Visible = true;
                Task.Factory.StartNew(() =>
                {
                    try
                    {
                        var stream = new WebClient().OpenRead("http://s3.amazonaws.com/Minecraft.Download/versions/b1.7.3/b1.7.3.jar");
                        var ms     = new MemoryStream();
                        CopyStream(stream, ms);
                        ms.Seek(0, SeekOrigin.Begin);
                        stream.Dispose();
                        var jar = ZipFile.Read(ms);
                        var zip = new ZipFile();
                        zip.AddEntry("pack.txt", "Minecraft textures");
                        CopyBetweenZips("pack.png", jar, zip);
                        CopyBetweenZips("terrain.png", jar, zip);
                        // TODO: Items, windows, etc
                        zip.Save(Path.Combine(TexturePack.TexturePackPath, "Minecraft.zip"));
                        Application.Invoke(() =>
                        {
                            OfficialAssetsProgress.Visible = false;
                            var texturePack = TexturePack.FromArchive(Path.Combine(TexturePack.TexturePackPath, "Minecraft.zip"));
                            _texturePacks.Add(texturePack);
                            AddTexturePackRow(texturePack);
                        });
                        ms.Dispose();
                    }
                    catch (Exception ex)
                    {
                        Application.Invoke(() =>
                        {
                            MessageDialog.ShowError("Error retrieving assets", ex.ToString());
                            OfficialAssetsProgress.Visible = false;
                            OfficialAssetsButton.Visible   = true;
                        });
                    }
                });
            }
        }
Ejemplo n.º 25
0
        public void Disconnect(string title, string reason)
        {
            Events.RaiseDisconnected(title, reason);

            Gui.Reset(this);
            World.Reset();
            WorldEvents.RaiseOnNewMap();

            IDrawer2D.InitCols();
            BlockInfo.Reset();
            TexturePack.ExtractDefault(this);
            Gui.SetNewScreen(new DisconnectScreen(this, title, reason));
            GC.Collect();
        }
Ejemplo n.º 26
0
        public void CanMapRectangle()
        {
            // ARRANGE
            var texturePack = new TexturePack(2000, 1000);
            var region      = texturePack
                              .Add(500, 500, 100, 100)
                              .Get(1);

            // ACT
            var uv = region.Map(new Vector2(0.5f, 0.5f));

            Assert.IsTrue(Math.Abs(0.275 - uv.x) < Precision);
            Assert.IsTrue(Math.Abs(0.55 - uv.y) < Precision);
        }
Ejemplo n.º 27
0
        private void DumpTexture(TexturePack texturePack, CMerlinTexture texture, string directoryPath)
        {
            int mipmapIndex = 0;

            foreach (var mipmap in texture.Mipmaps)
            {
                Console.WriteLine("Dumping decal mipmap " + mipmapIndex);

                using (Bitmap bitmap = new Bitmap(mipmap.ImageDimensions.Width, mipmap.ImageDimensions.Height, System.Drawing.Imaging.PixelFormat.Format8bppIndexed))
                {
                    var palette = bitmap.Palette;
                    for (int i = 0; i < palette.Entries.Length; i++)
                    {
                        palette.Entries.SetValue(texturePack.Palette[i], i);
                    }
                    // Need to set the palette as we were given a clone of the original
                    bitmap.Palette = palette;

                    int imageDataPtr = 0;
                    for (int y = 0; y < mipmap.ImageDimensions.Height; y++)
                    {
                        BitmapData bitmapData = bitmap.LockBits(new Rectangle(0, y, mipmap.ImageDimensions.Width, 1), ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed);
                        byte[]     row        = new byte[mipmap.ImageDimensions.Width];

                        foreach (var span in mipmap.PixelSpans[y])
                        {
                            for (int x = span.StartIndex >> mipmapIndex; x < (span.EndIndex + 1) >> mipmapIndex; x++)
                            {
                                row[x] = mipmap.ImageData[imageDataPtr++];
                            }
                        }

                        Marshal.Copy(row, 0, bitmapData.Scan0, row.Length);
                        bitmap.UnlockBits(bitmapData);
                    }
                    if (imageDataPtr != mipmap.ImageData.Length)
                    {
                        throw new InvalidOperationException();
                    }

                    // Convert from column-major bottom-up Hover format to human-editable foramt
                    bitmap.RotateFlip(RotateFlipType.Rotate90FlipX);
                    bitmap.Save(directoryPath + "\\" + texture.Name + "_MIPMAP_" + mipmap.Level + ".gif", ImageFormat.Gif);

                    mipmapIndex++;
                }
            }
        }
Ejemplo n.º 28
0
        public void Disconnect(string title, string reason)
        {
            World.Reset();
            WorldEvents.RaiseOnNewMap();
            Gui.SetNewScreen(new DisconnectScreen(this, title, reason));

            IDrawer2D.InitCols();
            BlockInfo.Reset();
            TexturePack.ExtractDefault(this);

            for (int i = 0; i < Components.Count; i++)
            {
                Components[i].Reset(this);
            }
            GC.Collect();
        }
Ejemplo n.º 29
0
        private void CombineTexturesToFile(string xmlFile, string texturePackFile)
        {
            Console.WriteLine("Creating {0} from XML file {1}:", texturePackFile, xmlFile);

            XmlDocument         xmlDocument         = new XmlDocument();
            XmlNamespaceManager xmlNamespaceManager = new XmlNamespaceManager(xmlDocument.NameTable);

            xmlNamespaceManager.AddNamespace("t", NAMESPACE);
            xmlDocument.Load(xmlFile);

            Console.WriteLine("Processing palette...");
            TexturePack texturePack = new TexturePack();

            Color[] palette = new Color[TexturePack.PALETTE_ENTRIES];
            foreach (var paletteEntry in xmlDocument.SelectNodes("/t:TexturePack/t:Palette/t:Entry", xmlNamespaceManager).OfType <XmlNode>())
            {
                palette[int.Parse(paletteEntry.Attributes["Index"].Value)] = Color.FromArgb(
                    int.Parse(paletteEntry.Attributes["Red"].Value),
                    int.Parse(paletteEntry.Attributes["Green"].Value),
                    int.Parse(paletteEntry.Attributes["Blue"].Value));
            }
            texturePack.Palette = palette.ToArray();

            List <CMerlinTexture> textures = new List <CMerlinTexture>();

            foreach (var textureDef in xmlDocument.SelectNodes("/t:TexturePack/t:Textures/t:Texture", xmlNamespaceManager).OfType <XmlNode>())
            {
                string textureName = textureDef.Attributes["Name"].Value;
                Console.WriteLine("Processing texture {0}...", textureName);
                var    mipmapDef  = textureDef.SelectSingleNode("t:MipMap", xmlNamespaceManager);
                string bitmapPath = Path.Combine(Path.GetDirectoryName(xmlFile), mipmapDef.Attributes["Data"].Value);
                using (Bitmap bitmap = new Bitmap(bitmapPath))
                {
                    CMerlinTexture texture = new CMerlinTexture();
                    texture.Name = textureName;
                    texture.UpdateImage(
                        texturePack,
                        bool.Parse(textureDef.Attributes["HasTransparency"].Value),
                        bitmap);
                    textures.Add(texture);
                }
            }
            texturePack.Textures = textures;

            Console.WriteLine("Saving to {0}", texturePackFile);
            SaveHoverFile(texturePackFile, texturePack);
        }
Ejemplo n.º 30
0
    public void clickButtonPlay()
    {
        //On récupère la Map choisie à envoyer au MapGenerator:
        string choosenMapFilePath = chooseMap();

        //On récupère le TexturePack choisi à envoyer au MapGenerator:
        TexturePack choosenTexturePack = chooseTexture();

        //On récupère le MapGenerator:
        MapGenerator mapGenerator = mapManager.GetComponent <MapGenerator>();

        //On récupère le nombre de joueurs IA:
        mapGenerator.setIANumber(chooseIANumber());

        //On envoie les informations au MapGenerator:
        mapGenerator.launchLevel(choosenMapFilePath, choosenTexturePack);
    }