MineColonies

MineColonies

53M Downloads

Ressource pack compatibility

steevmau opened this issue · 9 comments

commented

Minecolonies version

version 0.8.3167 or curse X.X.XX

Expected behavior

  • Using 3232 ressrouce pack, in villager gui window to look at his stats.
    (icons.png is 512
    512)

Actual behaviour

  • only half is displayed like if it was icons.png with a size of 256*256

Steps to reproduce the problem

  1. install a higher resolution (in my case a 32*32)
  2. open dialog GUI with a villager
    2017-07-16_20 10 10
commented
commented

@Raycoms I'm experiencing the same issue, and I believe it stems from the fact that the icons change their pixel coordinates based on the size of the texturepack and Minecolonies doesn't use the correct coordinates or sizes.

I'm using 1.12-0.8.3167.

commented
commented

@Raycoms I think you have to use relative coordinates when you're getting images here. Maybe make a util class that finds the ratio between the resourcepack and vanilla and adjusts positions by that ratio?

commented

@Raycoms you ware using direct Rendering
You Need to check how MC renders this!, it has textures for all of this!

commented
commented

Might be i made mine in 1.8 and later so yeah possible for sure.

commented

@OrionDevelopment

for (int i = 0; i < citizen.getMaxHealth() / 2; i++)
        {
            @NotNull final Image heart = new Image();
            heart.setImage(Gui.ICONS, EMPTY_HEART_ICON_ROW_POS, HEART_ICON_COLUMN, HEART_ICON_HEIGHT_WIDTH, HEART_ICON_HEIGHT_WIDTH);
            heart.setPosition(i * HEART_ICON_POS_X + HEART_ICON_OFFSET_X, HEART_ICON_POS_Y);
            findPaneOfTypeByID(WINDOW_ID_HEALTHBAR, View.class).addChild(heart);
        }

I mean if the other resource pack overwrites Gui.ICONS and puts everything at the same location there shouldn't be a problem at all.

I also took a look in the minecraft code, it seems to make it the same static way.
It just doesn't select "Gui.ICONS" it seems.

commented

Is the size static in pixels?