Solved Damaged value not 0 for Unbreable Items?

Discussion in 'Spigot Plugin Development' started by Minenash, Jun 21, 2018.

  1. Sorry if this isn't the right subforum, I'm using these guis for a plugin.

    At least in 1.9, if an item was Unbreakable, regardless of it's "damage" value, it's "damaged" value would be 0. But now it isn't?


    Code (Text):
    {
        "parent": "item/handheld",
        "textures": {
            "layer0": "items/diamond_hoe"
        },
        "overrides": [
            { "predicate": {"damaged": 1, "damage": 0}, "model": "item/diamond_hoe"},
            { "predicate": {"damaged": 0, "damage": 0.0006402048655569782}, "model": "gui/custom/lower_section"},
            { "predicate": {"damaged": 0, "damage": 0.0012804097311139564}, "model": "gui/custom/generic"},
            { "predicate": {"damaged": 0, "damage": 0.0019206145966709346}, "model": "gui/custom/alloy_smelter"},
            { "predicate": {"damaged": 0, "damage": 0.002560819462227913}, "model": "gui/custom/blast_furnace_v1"},
            { "predicate": {"damaged": 0, "damage": 0.003201024327784891}, "model": "gui/custom/blast_furnace_v2"},
            { "predicate": {"damaged": 0, "damage": 0.0038412291933418692}, "model": "gui/custom/coke_oven_v1"},
            { "predicate": {"damaged": 0, "damage": 0.004481434058898847}, "model": "gui/custom/coke_oven_v1_1"},
            { "predicate": {"damaged": 0, "damage": 0.005121638924455826}, "model": "gui/custom/coke_oven_v2"},
            { "predicate": {"damaged": 0, "damage": 0.005761843790012804}, "model": "gui/custom/iron_tank"},
            { "predicate": {"damaged": 0, "damage": 0.006402048655569782}, "model": "gui/custom/puliviser"},
            { "predicate": {"damaged": 0, "damage": 0.00704225352112676}, "model": "gui/custom/sag_mill"},
            { "predicate": {"damaged": 0, "damage": 0.0076824583866837385}, "model": "gui/custom/smelting_crafter_v1"},
            { "predicate": {"damaged": 0, "damage": 0.008322663252240717}, "model": "gui/custom/smelting_crafter_v2"},
            { "predicate": {"damaged": 0, "damage": 0.008962868117797694}, "model": "gui/custom/teleporter_v1"},
            { "predicate": {"damaged": 0, "damage": 0.009603072983354673}, "model": "gui/custom/teleporter_v2"},
            { "predicate": {"damaged": 0, "damage": 0.010243277848911651}, "model": "gui/custom/uncrafter"},
            { "predicate": {"damaged": 0, "damage": 0.01088348271446863}, "model": "item/diamond_hoe16"},
            { "predicate": {"damaged": 1, "damage": 0.011523687580025609}, "model": "item/diamond_hoe17"},
            { "predicate": {"damaged": 1, "damage": 0.012163892445582586}, "model": "item/diamond_hoe18"},
            { "predicate": {"damaged": 1, "damage": 0.012804097311139564}, "model": "item/diamond_hoe19"},
            { "predicate": {"damaged": 1, "damage": 0.013444302176696543}, "model": "item/diamond_hoe20"},
            { "predicate": {"damaged": 1, "damage": 0.01408450704225352}, "model": "item/diamond_hoe21"},
            { "predicate": {"damaged": 1, "damage": 0.014724711907810498}, "model": "item/diamond_hoe22"},
            { "predicate": {"damaged": 1, "damage": 0.015364916773367477}, "model": "item/diamond_hoe23"},
            { "predicate": {"damaged": 1, "damage": 0.016005121638924456}, "model": "item/diamond_hoe24"},
            { "predicate": {"damaged": 1, "damage": 0.016645326504481434}, "model": "item/diamond_hoe25"},
            { "predicate": {"damaged": 1, "damage": 0.017285531370038413}, "model": "item/diamond_hoe26"},
            { "predicate": {"damaged": 1, "damage": 0.017925736235595388}, "model": "item/diamond_hoe27"},
            { "predicate": {"damaged": 1, "damage": 0.018565941101152367}, "model": "item/diamond_hoe28"},
            { "predicate": {"damaged": 1, "damage": 0.019206145966709345}, "model": "item/diamond_hoe29"},
            { "predicate": {"damaged": 1, "damage": 0.019846350832266324}, "model": "item/diamond_hoe30"},
            { "predicate": {"damaged": 1, "damage": 0.020486555697823303}, "model": "item/diamond_hoe31"},
            { "predicate": {"damaged": 1, "damage": 0.02112676056338028}, "model": "item/diamond_hoe32"},
            { "predicate": {"damaged": 1, "damage": 0.02176696542893726}, "model": "item/diamond_hoe33"},
            { "predicate": {"damaged": 1, "damage": 0.02240717029449424}, "model": "item/diamond_hoe34"},
            { "predicate": {"damaged": 1, "damage": 0.023047375160051217}, "model": "item/diamond_hoe35"},
            { "predicate": {"damaged": 1, "damage": 0.023687580025608192}, "model": "item/diamond_hoe36"},
            { "predicate": {"damaged": 1, "damage": 0.02432778489116517}, "model": "item/diamond_hoe37"},
            { "predicate": {"damaged": 1, "damage": 0.02496798975672215}, "model": "item/diamond_hoe38"},
            { "predicate": {"damaged": 1, "damage": 0.02560819462227913}, "model": "item/diamond_hoe39"},
            { "predicate": {"damaged": 1, "damage": 0.026248399487836107}, "model": "item/diamond_hoe40"},
            { "predicate": {"damaged": 1, "damage": 0.026888604353393086}, "model": "item/diamond_hoe41"},
            { "predicate": {"damaged": 1, "damage": 0.027528809218950064}, "model": "item/diamond_hoe42"},
            { "predicate": {"damaged": 1, "damage": 0.02816901408450704}, "model": "item/diamond_hoe43"},
            { "predicate": {"damaged": 1, "damage": 0.028809218950064018}, "model": "item/diamond_hoe44"},
            { "predicate": {"damaged": 1, "damage": 0.029449423815620997}, "model": "item/diamond_hoe45"},
            { "predicate": {"damaged": 1, "damage": 0.030089628681177975}, "model": "item/diamond_hoe46"},
            { "predicate": {"damaged": 1, "damage": 0.030729833546734954}, "model": "item/diamond_hoe47"},
            { "predicate": {"damaged": 1, "damage": 0.03137003841229193}, "model": "item/diamond_hoe48"},
            { "predicate": {"damaged": 1, "damage": 0.03201024327784891}, "model": "item/diamond_hoe49"},
            { "predicate": {"damaged": 1, "damage": 0.03265044814340589}, "model": "item/diamond_hoe50"},
            { "predicate": {"damaged": 1, "damage": 0.03329065300896287}, "model": "item/diamond_hoe51"},
            { "predicate": {"damaged": 1, "damage": 0.03393085787451985}, "model": "item/diamond_hoe52"},
            { "predicate": {"damaged": 1, "damage": 0.034571062740076826}, "model": "item/diamond_hoe53"},
            { "predicate": {"damaged": 1, "damage": 0.035211267605633804}, "model": "item/diamond_hoe54"},
            { "predicate": {"damaged": 1, "damage": 0.035851472471190776}, "model": "item/diamond_hoe55"},
            { "predicate": {"damaged": 1, "damage": 0.036491677336747755}, "model": "item/diamond_hoe56"},
            { "predicate": {"damaged": 1, "damage": 0.03713188220230473}, "model": "item/diamond_hoe57"},
            { "predicate": {"damaged": 1, "damage": 0.03777208706786171}, "model": "item/diamond_hoe58"},
            { "predicate": {"damaged": 1, "damage": 0.03841229193341869}, "model": "item/diamond_hoe59"},
            { "predicate": {"damaged": 1, "damage": 0.03905249679897567}, "model": "item/diamond_hoe60"},
            { "predicate": {"damaged": 1, "damage": 0.03969270166453265}, "model": "item/diamond_hoe61"},
            { "predicate": {"damaged": 1, "damage": 0.04033290653008963}, "model": "item/diamond_hoe62"},
            { "predicate": {"damaged": 1, "damage": 0.040973111395646605}, "model": "item/diamond_hoe63"},
            { "predicate": {"damaged": 1, "damage": 0.041613316261203584}, "model": "item/diamond_hoe64"},
            { "predicate": {"damaged": 1, "damage": 0.04225352112676056}, "model": "item/diamond_hoe65"},
            { "predicate": {"damaged": 1, "damage": 0.04289372599231754}, "model": "item/diamond_hoe66"},
            { "predicate": {"damaged": 1, "damage": 0.04353393085787452}, "model": "item/diamond_hoe67"},
            { "predicate": {"damaged": 1, "damage": 0.0441741357234315}, "model": "item/diamond_hoe68"},
            { "predicate": {"damaged": 1, "damage": 0.04481434058898848}, "model": "item/diamond_hoe69"},
            { "predicate": {"damaged": 1, "damage": 0.045454545454545456}, "model": "item/diamond_hoe70"},
            { "predicate": {"damaged": 1, "damage": 0.046094750320102434}, "model": "item/diamond_hoe71"},
            { "predicate": {"damaged": 1, "damage": 0.046734955185659406}, "model": "item/diamond_hoe72"},
            { "predicate": {"damaged": 1, "damage": 0.047375160051216385}, "model": "item/diamond_hoe73"},
            { "predicate": {"damaged": 1, "damage": 0.04801536491677336}, "model": "item/diamond_hoe74"},
            { "predicate": {"damaged": 1, "damage": 0.04865556978233034}, "model": "item/diamond_hoe75"},
            { "predicate": {"damaged": 1, "damage": 0.04929577464788732}, "model": "item/diamond_hoe76"},
            { "predicate": {"damaged": 1, "damage": 0.0499359795134443}, "model": "item/diamond_hoe77"},
            { "predicate": {"damaged": 1, "damage": 0.05057618437900128}, "model": "item/diamond_hoe78"},
            { "predicate": {"damaged": 1, "damage": 0.05121638924455826}, "model": "item/diamond_hoe79"},
            { "predicate": {"damaged": 1, "damage": 0.051856594110115235}, "model": "item/diamond_hoe80"},
            { "predicate": {"damaged": 1, "damage": 0.052496798975672214}, "model": "item/diamond_hoe81"},
            { "predicate": {"damaged": 1, "damage": 0.05313700384122919}, "model": "item/diamond_hoe82"},
            { "predicate": {"damaged": 1, "damage": 0.05377720870678617}, "model": "item/diamond_hoe83"},
            { "predicate": {"damaged": 1, "damage": 0.05441741357234315}, "model": "item/diamond_hoe84"},
            { "predicate": {"damaged": 1, "damage": 0.05505761843790013}, "model": "item/diamond_hoe85"},
            { "predicate": {"damaged": 1, "damage": 0.05569782330345711}, "model": "item/diamond_hoe86"},
            { "predicate": {"damaged": 1, "damage": 0.05633802816901408}, "model": "item/diamond_hoe87"},
            { "predicate": {"damaged": 1, "damage": 0.05697823303457106}, "model": "item/diamond_hoe88"},
            { "predicate": {"damaged": 1, "damage": 0.057618437900128036}, "model": "item/diamond_hoe89"},
            { "predicate": {"damaged": 1, "damage": 0.058258642765685015}, "model": "item/diamond_hoe90"},
            { "predicate": {"damaged": 1, "damage": 0.05889884763124199}, "model": "item/diamond_hoe91"},
            { "predicate": {"damaged": 1, "damage": 0.05953905249679897}, "model": "item/diamond_hoe92"},
            { "predicate": {"damaged": 1, "damage": 0.06017925736235595}, "model": "item/diamond_hoe93"},
            { "predicate": {"damaged": 1, "damage": 0.06081946222791293}, "model": "item/diamond_hoe94"},
            { "predicate": {"damaged": 1, "damage": 0.06145966709346991}, "model": "item/diamond_hoe95"},
            { "predicate": {"damaged": 1, "damage": 0.06209987195902689}, "model": "item/diamond_hoe96"},
            { "predicate": {"damaged": 1, "damage": 0.06274007682458387}, "model": "item/diamond_hoe97"},
            { "predicate": {"damaged": 1, "damage": 0.06338028169014084}, "model": "item/diamond_hoe98"},
            { "predicate": {"damaged": 1, "damage": 0.06402048655569782}, "model": "item/diamond_hoe99"},
            { "predicate": {"damaged": 1, "damage": 0.0646606914212548}, "model": "item/diamond_hoe100"}
        ]
    }
     
  2. I have very little experience with resource packs, but I do believe order matters. Could you try moving your first predicate line to the bottom of the file?
     
  3. You have 1/0:
    Code (Text):
    { "predicate": {"damaged": 1, "damage": 0}, "model": "item/diamond_hoe"},
    I'm pretty sure 0/0 is required too.
    Code (Text):
    { "predicate": {"damaged": 1, "damage": 0}, "model": "item/diamond_hoe"},
    { "predicate": {"damaged": 0, "damage": 0}, "model": "item/diamond_hoe"},
     
    • Agree Agree x 1
  4. @GreatThane, thanks that worked, I always remember it working at the top before, maybe they changed how overwrite works.
     
    • Friendly Friendly x 1