Pokecube AIO

Pokecube AIO

498k Downloads

Pokemons with white textures

Lufims opened this issue ยท 11 comments

commented

Issue Description:

Some pokemons are with white textures, my minecraft version is 1.12.2.
2022-09-05_07 52 29

What happens:

Pokemons with white textures

What you expected to happen:

Pokemons with correct textures

Steps to reproduce:

1.Open the game


Affected Versions (Do not use "latest"): Replace with a list of all mods you have in.

  • Pokecube AIO:
  • Minecraft: 1.12.2
  • Forge: 14.23.5.2860
commented

1.12.2 hasn't been supported for nearly 3 years now...

What graphics hardware do you have? IIRC some of the older hardware doesn't support textures that are not 2^n x 2^m resolution, and this results in a very similar thing to what you see there. Does this affect all models? if not, check the resolution of the textures of the ones it does affect. You should be able to fix it by making a resourcepack with the resized textures

My pc is very old, so I think this is what causing this, and this affect almost all pokemons and some hasn't even textures, it just have that purple and black squares textures, and thanks for the tip, i'll try to make a resource pack even though i've never tried it before.

commented

1.12.2 hasn't been supported for nearly 3 years now...

What graphics hardware do you have? IIRC some of the older hardware doesn't support textures that are not 2^n x 2^m resolution, and this results in a very similar thing to what you see there. Does this affect all models? if not, check the resolution of the textures of the ones it does affect. You should be able to fix it by making a resourcepack with the resized textures

commented

Here is the resourcepack I made last time this problem was reported, but I don't know if that was for the 1.12.2 version or not, so it may not work?

ResizedTextures.zip

commented

that resourcepack is from 2016, so probably too old to work here?

commented

Here is the resourcepack I made last time this problem was reported, but I don't know if that was for the 1.12.2 version or not, so it may not work?

ResizedTextures.zip

Thanks, I was trying to make my own version of that and it take an entire day to make just 2 pokemons, so this is really helpful, and i think it will work even if it's not for 1.12.2, because it's not a minecraft texture that have blocks that only have in this version so i just have to edit the manifest file and make it run on the 1.12.2 version, if it's not for this version.

commented

in one of the minecraft versions the texture names changed, I don't remember if it was before or after 1.12.2, those names appear to be the older kind of name. I suggest using a script to mass re-size them, I think I did that one with imagemagick, you can also use a python script, etc

commented

in one of the minecraft versions the texture names changed, I don't remember if it was before or after 1.12.2, those names appear to be the older kind of name. I suggest using a script to mass re-size them, I think I did that one with imagemagick, you can also use a python script, etc

I'll try it then, because even with this texture the pokemons are white, my pc just supports x128 textures.

commented

I don't remember the one for imagemagick, but here is the python script that I used to make the icons:

from PIL import Image
import PIL
import os
from glob import glob

imgs = [y for x in os.walk(".") for y in glob(os.path.join(x[0], '*.png'))]

size = 32, 32
lastdir = None
for file in imgs:
    img = Image.open(file)
    img = img.resize(size,resample=PIL.Image.HAMMING)
    file = file.replace('img', 'icon', 1)
    dir = os.path.dirname(file)
    try:
        os.makedirs(dir)
    except:
        pass
    if dir!=lastdir:
        print(dir)
    lastdir = dir
    img.save(file, "png")

I think it might work for you if you just change 32, 32 to 128,128.

How to use this:

Make a new folder, put this script in that folder. Inside the folder, make a folder called img, put all of the textures in there (they can be in subfolders inside img) Run the script, it should make a folder called icon containing the resized textures.

NO NOT run this script in a folder that already had stuff in it, as it will walk though all subfolders!

Thank you, I just tested it and now all the textures are right, seriously, thanks.

commented

You're welcome, let me know if anything else goes wrong, just note that since 1.12.2 isn't really supported, I won't make any code related changes!

commented

in one of the minecraft versions the texture names changed, I don't remember if it was before or after 1.12.2, those names appear to be the older kind of name. I suggest using a script to mass re-size them, I think I did that one with imagemagick, you can also use a python script, etc

what cmd code did you used to convert all the images? I tried it and it just returns a lot of exceptions.

commented

I don't remember the one for imagemagick, but here is the python script that I used to make the icons:

from PIL import Image
import PIL
import os
from glob import glob

imgs = [y for x in os.walk(".") for y in glob(os.path.join(x[0], '*.png'))]

size = 32, 32
lastdir = None
for file in imgs:
    img = Image.open(file)
    img = img.resize(size,resample=PIL.Image.HAMMING)
    file = file.replace('img', 'icon', 1)
    dir = os.path.dirname(file)
    try:
        os.makedirs(dir)
    except:
        pass
    if dir!=lastdir:
        print(dir)
    lastdir = dir
    img.save(file, "png")

I think it might work for you if you just change 32, 32 to 128,128.

How to use this:

Make a new folder, put this script in that folder.
Inside the folder, make a folder called img, put all of the textures in there (they can be in subfolders inside img)
Run the script, it should make a folder called icon containing the resized textures.

NO NOT run this script in a folder that already had stuff in it, as it will walk though all subfolders!