2 Star 1 Fork 1

GermMC / WikiGermEngine

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
custom_quick_bar.md 4.85 KB
一键复制 编辑 原始数据 按行查看 历史
GermMC 提交于 2022-01-03 20:32 . first commit

自定义快捷栏


第一步,在服务端中新建GermPlugin/gui/game_quick_bar.yml,并填入对应基础配置

#观察者模式会继续使用原版的快捷栏,暂时并没有办法魔改观察者模式的快捷栏
#
#在这个界面中 可以这么复写槽位 (在3.2之后 其他界面也可以用这些identity)
# identity为 germmod_main_hand 的槽位,将被握住的物品填满
# identity为 germmod_off_hand 的槽位,将副手握住的物品填满
# identity为 germmod_armor_helmet 的槽位,将被头上的物品填满
# identity为 germmod_armor_chestplate 的槽位,将被身体上的物品填满
# identity为 germmod_armor_leggings 的槽位,将被腿上的的物品填满
# identity为 germmod_armor_boots 的槽位,将被脚上的的物品填满
#
# identity为 germmod_backpack_0 的槽位,将被快捷栏的第一个物品填满
# identity为 germmod_backpack_1 的槽位,将被快捷栏的第二个物品填满
# identity为 ...
# identity为 germmod_backpack_35 的槽位,将被背包的最后一个物品填满
#
# 如果你熟知萌芽背包的hook方式 那么这个与他的区别就在于 germmod_ 与 germplugin_
# 这时候有朋友会问了,那为什么不直接用germplugin_,诶 没错确实可以用,但是快捷栏是不存在交互的,germmod_不存在交互逻辑,所以较germplugin_性能更好
#
# 在当前手持物品所在的槽位存在的情况下
# %quick_holding_slot_x% 会返回当前手持物品所在的槽位的X坐标
# %quick_holding_slot_y% 会返回当前手持物品所在的槽位的Y坐标
# %quick_holding_slot_z% 会返回当前手持物品所在的槽位的Z坐标
#
# %quick_holding_slot_id% 会返回握住的物品槽的ID
#
# 名字为 game_quick_bar 的界面配置会替换掉原版的快捷栏
# 下面是默认的配置 可以直接复制出来用
game_quick_bar:
  #该界面的私有参数
  private:
    #切换物品出现的提示偏移量
    tooltipOffsetX: "0"
    tooltipOffsetY: "0"
    #actionBar的偏移量
    actionBarOffsetX: "0"
    actionBarOffsetY: "0"
  options:
    startX: "w*0.5"
    startY: "h"
    openDos:
      - "update<->thisGui@texture"
      - "goto<->1"
  quick_bar_backpack_0:
    type: slot
    size: "16"
    identity: "germmod_backpack_0"
    fillPath: 'local<->textures/gui/slot.png'
    emptyPath: 'local<->textures/gui/slot.png'
    locationX: "-96"
    locationY: "-18"
  quick_bar_backpack_1:
    type: slot
    size: "16"
    identity: "germmod_backpack_1"
    fillPath: 'local<->textures/gui/slot.png'
    emptyPath: 'local<->textures/gui/slot.png'
    locationX: "-96 +18 +4"
    locationY: "-18"
  quick_bar_backpack_2:
    type: slot
    size: "16"
    identity: "germmod_backpack_2"
    fillPath: 'local<->textures/gui/slot.png'
    emptyPath: 'local<->textures/gui/slot.png'
    locationX: "-96 +18 +4 +18 + 4"
    locationY: "-18"
  quick_bar_backpack_3:
    type: slot
    size: "16"
    identity: "germmod_backpack_3"
    fillPath: 'local<->textures/gui/slot.png'
    emptyPath: 'local<->textures/gui/slot.png'
    locationX: "-96 +18 +4 +18 + 4 +22"
    locationY: "-18"
  quick_bar_backpack_4:
    type: slot
    size: "16"
    identity: "germmod_backpack_4"
    fillPath: 'local<->textures/gui/slot.png'
    emptyPath: 'local<->textures/gui/slot.png'
    locationX: "-96 +18 +4 +18 + 4 +22 +22-1"
    locationY: "-18"
  quick_bar_backpack_5:
    type: slot
    size: "16"
    identity: "germmod_backpack_5"
    fillPath: 'local<->textures/gui/slot.png'
    emptyPath: 'local<->textures/gui/slot.png'
    locationX: "-96 +18 +4 +18 + 4 +22 +22+22-1"
    locationY: "-18"
  quick_bar_backpack_6:
    type: slot
    size: "16"
    identity: "germmod_backpack_6"
    fillPath: 'local<->textures/gui/slot.png'
    emptyPath: 'local<->textures/gui/slot.png'
    locationX: "-96 +18 +4 +18 + 4 +22 +22+22+22-1"
    locationY: "-18"
  quick_bar_backpack_7:
    type: slot
    size: "16"
    identity: "germmod_backpack_7"
    fillPath: 'local<->textures/gui/slot.png'
    emptyPath: 'local<->textures/gui/slot.png'
    locationX: "-96 +18 +4 +18 + 4 +22 +22+22+22+22-2"
    locationY: "-18"
  quick_bar_backpack_8:
    type: slot
    size: "16"
    identity: "germmod_backpack_8"
    fillPath: 'local<->textures/gui/slot.png'
    emptyPath: 'local<->textures/gui/slot.png'
    locationX: "-96 +22 +22 +22 +22+22+22+22+22 - 2"
    locationY: "-18"
  quick_bar_offhand:
    type: slot
    enable: "exist(%germ_slot_has_item:germmod_off_hand%,true)"
    size: "16"
    identity: "germmod_off_hand"
    fillPath: 'local<->textures/gui/slot.png'
    emptyPath: 'local<->textures/gui/slot.png'
    locationX: "-96-22 -16"
    locationY: "-18"
  texture:
    type: texture
    path: 'url<->https://s1.ax1x.com/2020/11/07/BIJE5D.png'
    locationX: "%quick_holding_slot_x%-1"
    locationY: "%quick_holding_slot_y%-1"
    locationZ: "%quick_holding_slot_z%+2"
    width: "18"
    height: "18"
1
https://gitee.com/germmc/wiki-germ-engine.git
git@gitee.com:germmc/wiki-germ-engine.git
germmc
wiki-germ-engine
WikiGermEngine
master

搜索帮助