EpicBanItemTeam / VirtualChest

A sponge plugin providing virtual chest GUIs for menus like ChestCommands
https://ore.spongepowered.org/zzzz/VirtualChest
GNU Lesser General Public License v3.0
34 stars 12 forks source link

[Bug] Custom resource textures not appearing #76

Closed ghost closed 4 years ago

ghost commented 5 years ago

I am trying to use some custom textures for someone that has them set in the resource pack. Previously I have been able to accomplish this in code simply by setting the items unbreakable key to true and setting UnsafeDamage. However, I tried the same method here to no avail.

Any idea why it isn't carrying through like usual?

  hats-item {
    Item {
      ItemType = "minecraft:iron_hoe"
      DisplayName = "&b&lHats"
      Count = 1
      UnsafeDamage = 1
      Unbreakable = true
      HideUnbreakable = true
      HideAttributes = true
      ItemLore = [
        "&7&oClick me to go to the Hats Menu!"
      ]
    }
    PrimaryAction {
      Command = "vchest open hats"
      KeepInventoryOpen = false
    }
  }

Using VirtualChest-1.0.0-rc-1.jar

SirFancyBacon commented 5 years ago

Could you post your .properties file you are using to load the custom texture?

ghost commented 5 years ago

Will try to soon. The person who I am working for and ultimately owns his texture pack is out atm

SirFancyBacon commented 5 years ago

Okay let me know, I happen to be okayly versed in cit with optifine.

ghost commented 5 years ago

https://pastebin.com/Qf41s0A8 Here is the file I am having trouble with. This exact file is currently working with my custom plugin but I can’t seem to make the same result with VChest

SirFancyBacon commented 5 years ago

I am unfamiliar with the Minecraft style of custom item replacement unfortunately..

However, I believe the issue to be related to the item in VC does not have any damage defined and this it is an undamaged iron hoe, and so your textures do not apply to it. I know how you can fix this with Custom Item Textures (CIT) using Optifine; but i am afraid i do not know how to fix this with a normal MC resource pack..

@ustc-zzzz is there a way to define damage for an item used in a slot in VC?

SirFancyBacon commented 5 years ago

@TSEcho Play with the UnsafeDamage value. I'm not sure how it is calculated but you need to set that to the damage of the item (i think) and that should fix your texture pack issue.

SirFancyBacon commented 4 years ago

@NateCraft I know this is an OLD issue. However i believe i have solved this. Within Optifine you need to wildcard your nbt.display.Name an example being nbt.display.Name=ipattern:*Bronze Mace