MehVahdJukaar / polytone

Other
31 stars 2 forks source link

I'm tired of guessing. #11

Closed Ebanytiy closed 5 months ago

Ebanytiy commented 5 months ago

despite the fact that the wiki does not mention how to make changes to the player inventory, I managed to do it. but I encountered another problem: the inability to change the position of the slot in the suvival player inventory. The slot position changes only in creative inventory. image image

MehVahdJukaar commented 5 months ago

So player survival screen is a super weird case asts the only one with slots but that doesnt have a menu like all others. You have to use menu_id and "inventory". I added that to the list of menu ids. I guess i need to add a small cheat sheet with the most common targets and their strategies

lxly9 commented 5 months ago

You will need to use "net.minecraft.class_1723" to target the survival inventory. I will add this class as a reference at the bottom of the wiki with the other container names.

  "target_type": "menu_class",
    "target": "net.minecraft.class_1723",
    "slot_modifiers": [
    {
      "slots": 0,
      "x_offset": -20,
      "y_offset": 22
    },
    {
      "slots": "1->4",
      "x_offset": 27,
      "y_offset": -11
    },
    {
      "slots": "5->8",
      "x_offset": 36,
      "y_offset": -1
    },
    {
      "slots": 45,
      "x_offset": -60,
      "y_offset": -11
    }
  ],
  "special_offsets": {
    "player": {
      "x_offset": 35,
      "y_offset": 0
    }
  },
  "sprites": [
    {
      "x": -102,
      "y": -95,
      "z": -500,
      "width": 204,
      "height": 190,
      "texture": "textures/gui/container/inventory_frame.png"
    }
  ],
  "title_y_offset": -1400
}
lxly9 commented 5 months ago

if youre not sure which class to use, use this website to look them up: https://linkie.shedaniel.me/mappings

lxly9 commented 5 months ago

its also in the wiki ho to modify the inventory (at least how it works on forge)

Ebanytiy commented 5 months ago

for me it doesn't work. the position of the slots has not changed. image image

lxly9 commented 5 months ago

Please restart your game after changing inventory slots. The class is working though, since you can see the stone.png.

Ebanytiy commented 5 months ago

thanks, it works now :)

MehVahdJukaar commented 5 months ago

Hm so reloading the pack doesn't work? Only works on first pack load? That's not good

lxly9 commented 5 months ago

yeah, thats what always happened since i wrote the wiki for slotify

MehVahdJukaar commented 5 months ago

odd i just tried it and it did change when i reloaded the resoruce pack

lxly9 commented 5 months ago

fabric or forge?