PluginBugs / Issues-ItemsAdder

Repository used to keep track of issues of my plugin ItemsAdder
https://itemsadder.devs.beer
54 stars 21 forks source link

GUIS get issues without Optifine #1908

Closed WarnDa closed 2 years ago

WarnDa commented 2 years ago

Terms

Discord tag (optional)

WarnD#0001

What happened?

I'm creating guis in three parts :

The whole 256x256 font work perfectly, but my sign/title (that are not 256x256) are not centered without optifine, but work perfectly with optifine

Without optifine : image With optifine : image

So I asked on discord and someone told me : image

But I don't really understand, I tried myself setting the "sign" and the "title" on a 256x256 font and tried in game : image image left : without optifine right : with optifine It's still getting issue, I don't understand why, should be good my title using deluxemenus :

menutitle: ':offset-48::ligne45::offset-187::moyen::offset-146::menu:'

So, what I am doing wrong, is there any easier solution ? As I don't really understand I have 90~100 bugged .png, so hope there is a fix.. :)

Steps to reproduce the issue

  1. Create multiple custom textures
  2. Add them in the same gui (deluxemenus)
  3. Try on 1.19 with and without opfitine
  4. Check if they get the same offset.

Server version

Pufferfish 1.19.2-32

ItemsAdder Version

3.2.3f

ProtocolLib Version

b597

LoneLibs Version

1.0.19

LightAPI Version (optional)

No response

LibsDisguises Version (optional)

No response

FULL server log

No response

Error (optional)

https://pastebin.com/7UGwF22q

ItemsAdder config.yml

metrics: true
update-checker: true
disable-plugin-loading-messages_DONT_ASK_ME_FOR_SUPPORT_IF_YOU_SET_TRUE__THANKS: false
resource-pack:
  hosting:
    no-host:
      enabled: false
    auto-external-host:
      enabled: false
    self-host:
      enabled: true
    external-host:
      enabled: false
      url: https://cdn.discordapp.com/attachments/764209683337969724/973661590966640740/my_pack_sans_protec.zip
      skip-url-file-type-check___DONT_ASK_HELP_IF_SET_TRUE: false
  apply-on-join: false
  kick-player-on-decline: false
  kick-player-on-fail: false
  delay-ticks: 1
  notify-other-plugins-interfering: true
  title:
    enabled: true
  protect-player:
    black-screen: true
    hide-hud: true
    cancel-movement: true
    lock-player: true
  command:
    usage-cooldown-seconds: 60
  custom-font:
    enabled: false
    name: ipaexg.ttf
    shift: '[0,0]'
    size: 11.0
    oversample: 2.0
  thin-font:
    enabled: false
  zip:
    protect-file-from-unzip:
      enabled: true
      extreme: true
    compress-png-files: true
    compress-json-files: true
    overwrite-vanilla-models: false
    overwrite-vanilla-lang-json: false
    generate-custom-armors-textures:
      vanilla_1_17: true
      optifine: false
    disable-overwrite-leather-armor-layers-textures: false
    fix_transparent_noteblocks__disable-for-more-performance: false
    ignore-files-ext:
    - db
    - yml
    - xcf
    - html
  items:
    CustomModelData-starting-value:
      ALL: 10000
      DIAMOND: 12000
config_files:
  lang: fr
  dictionaries-lang: fr
  extract-default-resources: false
  extract-default-configs: false
  legacy_pack: true
blocks:
  light-api: true
  fix-liquids-flow: true
  fix-floating-blocks: true
  fix-glitched-blocks:
    enabled: true
    only-new-chunks: false
    search-also-in-these-biomes:
      enabled: false
      biomes:
      - BEACH
      - BIRCH_FOREST
      - BIRCH_FOREST_HILLS
      - FOREST
      - MOUNTAINS
      - MOUNTAIN_EDGE
      - GRAVELLY_MOUNTAINS
      - PLAINS
      - RIVER
  cancel-break-wrong-tool:
    enabled: true
    send-actionbar: true
  campfire:
    unlit-on-place: true
    allow-any-item: true
  disable-REAL: false
  disable-REAL_TRANSPARENT: false
  disable-REAL_NOTE: false
  disable-REAL_WIRE: true
  disable-FIRE: false
items:
  fix-show-attack-and-damage-as-lore: true
  give_death_location_maps: false
  hide-custom-durability-lore: false
liquids:
  enabled: false
huds:
  enabled: false
mobs:
  disable-MOB-behaviour__DISABLE_AT_YOUR_OWN_RISK: false
font_images:
  replace-in-customitems-name-and-lore: true
  chat:
    enabled: true
    doublecheck-permission__disable-for-more-performance: false
    add-hover-suggestion: false
  command:
    enabled: true
    commandblocks: true
    excluded:
    - home
    - sethome
    - tpa
  sign:
    enabled: true
  book:
    enabled: true
  anvil:
    enabled: true
  inventory-title:
    enabled: true
  vault-prefix-suffix:
    enabled: true
    update-every-ticks: 1200
  scoreboard-teams:
    enabled: false
    update-every-ticks: 3600
  player-display-name:
    enabled: true
    update-every-ticks: 1200
effects:
  hide-scoreboard-numbers: true
  text-effects:
    enabled: true
    replace-in-customitems-name-and-lore: true
    chat:
      enabled: true
    sign:
      enabled: true
    book:
      enabled: true
    anvil:
      enabled: true
entities:
  max-furniture-vehicles-per-chunk: 1000
  allow-removing-old-furnitures_2_3_11: false
  custom-entitites:
    enabled: true
    interval-rendering-packets-ticks: 1
    emotes: true
    optimized-packets: true
recipes:
  hide-vanilla-unrecognized-recipe-errors: true
  fix-packet-too-large-kick: false
  custom-recipes:
    unlock:
      all-on-join: false
      on-pickup:
        any: false
        ingredients: true
  remove-vanilla-recipes:
    enabled: false
    list:
      DIAMOND_SWORD: false
      IRON_INGOT: false
debug:
  items:
    log-files-loading: false
    log-items-loading: false
    log-items-loading-disabled: false
    log-font-images-loading: false
    log-huds-loading: false
    log-attribute-modifiers-loading: false
    log-warnings: false
    log-loots-loading: false
    log-loots-loading-disabled: false
    log-armors-loading: false
  recipes:
    log-recipes-loading: false
    log-recipes-loading-disabled: false
    log-recipes-removed-vanilla: false
    log-fix-packet-too-large: false
    log-recipes-unknown-item: false
  resource-pack:
    log-extract-default-resources: false
    log-not-extract-default-resources-already-exist: false
  blocks:
    log-save: false
    log-save-on-unload: false
    log-mined-unknown-blocks: true
  worlds-populators:
    log-loading: false
    log-loading-disabled: false
    log-loading-no-populators: false
    log-loading-no-world: true
    log-generation: false
  trees-populators:
    log-loading: false
    log-loading-disabled: false
    log-loading-no-populators: false
    log-loading-no-world: true
    log-generation: false
  surface-decorators:
    log-loading: false
    log-loading-disabled: false
    log-loading-no-decorators: false
    log-loading-no-world: true
    log-generation: false
  player-stats:
    log-save: false
  performance:
    loading-ms: true
  huds:
    log-triggers: false
  other:
    log-dictionaries-loading: false
    log-liquids-loading: false
    log-minecraft_lang_overwrite-loading: false
  categories:
    log-total-loaded: true
    log-single-loaded: false
    log-single-loaded-overwrite: false
    log-single-skip: false
    log-icon-failed-load: false
  entities:
    log-files-loading: false
    log-entities-loading: false
    log-entities-loading-disabled: false
  cave-decorators:
    log-loading: false
    log-loading-disabled: false
    log-loading-no-decorators: false
    log-loading-no-world: true
    log-generation: false
loots:
  allow-loots-drop-from-spawners-using-silk-touch: false
chat-preview: false

Problematic items yml configuration file (optional)

info:
  namespace: smeltguis
font_images:
  ligne36:
    path: "font/gui/ligne36.png"
    suggest_in_command: false
    y_position: 67
  kits:
    path: "font/gui/menu.png"
    suggest_in_command: false
    y_position: 25
  moyen:
    path: "font/gui/moyen.png"
    suggest_in_command: false
    y_position: 26

Other files, you can drag and drop them here to upload. (optional)

No response

Screenshots/Videos (you can drag and drop files or paste links)

No response

LoneDev6 commented 2 years ago

I sincerely have no idea, I too work with font images and I've never had this kind of issues.

Try to add some transparent pixels on the top right and top left of the image. This could potentially bypass a known Minecraft feature which basically cuts the transparent part of the image. Adding two pixels on left and right will bypass this behaviour.

Add pixels here: Immagine 2022-08-16 104356

Anyway ItemsAdder already has this behaviour implemented, but maybe you are configuring font images manually and that's why ItemsAdder is not adding these pixels.

WarnDa commented 2 years ago

Thanks for your reply !

I even tried to put real pixels on each side : image

Left : with optifine Right : Without optifine

We can try to create an issue on discord so I can share my whole folder and you can maybe try yourself :c

WarnDa commented 2 years ago

If I change the order of the fonts, it works. Here it's the same pictures, just I changed the title before : ':offset-48::ligne45::offset-187::moyen::offset-146::menu:' after : ':offset-146::menu::offset-187::moyen::offset-48::ligne45:'

image and here we see now it's fine, so why it's not in the other side ? :c

LoneDev6 commented 2 years ago

Always make sure to configure your resourcepacks with vanilla client. Seems optifine is somehow changing the rendering order of the font images.

Let me know if your latest configuration works fine with OF and without it.

Have a nice week

WarnDa commented 2 years ago

Hello, I found the issue ! On every picture I have to manually add pixels on each side, or it doesn't scall well in game. ItemsAdder should do it itself but not working great :/

But, how can I add invisible pixel ? I can't, so I tried black ones, but we show them in game :/

WarnDa commented 2 years ago

Hello, I found the issue ! On every picture I have to manually add pixels on each side, or it doesn't scall well in game. ItemsAdder should do it itself but not working great :/

But, how can I add invisible pixel ? I can't, so I tried black ones, but we show them in game :/

If anyone have an idea please :)

LoneDev6 commented 2 years ago

I suspect that your textures have an alpha value not equal to 0 as background color. ItemsAdder will change the alpha value to 5 ONLY if the alpha value is 0, to avoid messing up with images. I guess I have to check if it's < 5, not if it's equal to 0.

I'll publish an update, please try to regenerate your resourcepack and check if it works after that fix.

WarnDa commented 2 years ago

Still not working for me : https://discord.com/channels/533407895010803753/1000071676849033236/1011326313069551786