rlf / uSkyBlock

The best skyblock bukkit plugin around...
http://dev.bukkit.org/bukkit-plugins/uskyblock/
GNU General Public License v3.0
76 stars 112 forks source link

Fireworks not detected for challenge required item #869

Open c0wg0d opened 8 years ago

c0wg0d commented 8 years ago

Please paste the output from /usb version below

[14:49:43 INFO]: Name: uSkyBlock
[14:49:43 INFO]: Version: 2.7.2
[14:49:43 INFO]: Description: Ultimate SkyBlock v2.7.2-45f756-430
[14:49:43 INFO]: Language: en (en)
[14:49:43 INFO]:   State: d=110, r=52, i=3,231, p=5,392, n=false, awe=true
[14:49:43 INFO]: Server: CraftBukkit git-Spigot-f9671b8-48b88ed (MC: 1.10.2)
[14:49:43 INFO]:   State: online=false, bungee=true
[14:49:43 INFO]: ------------------------------
[14:49:43 INFO]: Vault 1.5.6-b49 (ENABLED)
[14:49:43 INFO]: WorldEdit 6.1.3;7a097ca (ENABLED)
[14:49:43 INFO]: WorldGuard 6.1.2;e38d98d (ENABLED)
[14:49:43 INFO]: AsyncWorldEdit 3.4.1 (ENABLED)
[14:49:43 INFO]: Multiverse-Core 2.5-b717 (ENABLED)
[14:49:43 INFO]: ------------------------------

I have a fireworker challenge that does not work. Players who have 192 firework rockets in their inventory cannot complete the challenge.

challenges:
      fireworker:
        description: 'Craft a large amount of firework rockets.'
        type: onPlayer
        requiredItems: '401:192;+4'
        displayItem: '401'
        takeitem: true
        repeatable: true
        reward:
          items:
          - '173:4'
          - '327:1'
          - '89:8'
          text: 4 blocks of coal, 1 lava bucket, 8 glowstone
          currency: 40
          xp: 40
        repeatReward:
          items:
          - '173:1'
          - '348:4'
          text: 1 block of coal, 4 glowstone dust
          currency: 40
          xp: 40
dutchy1001 commented 8 years ago

this will probably be the same as with potions (see #866 ), just need to find the right tags

    - '401{Fireworks:{Flight:3,Explosions:[{Type:0,Flicker:1,Trail:0,Colors:[11743532],FadeColors:[]}]}}:1```

Not sure if the above code works, but that is how it should look I think
c0wg0d commented 8 years ago

I thought that might be the case. But what do I put if I don't care what kind of fireworks? I was expecting it to just be the ones you get with 1 paper + 1 gunpowder.

c0wg0d commented 8 years ago

After testing with my players, the 1 paper + 1 gunpowder rockets DO work in the challenge, just not any with colors added. I guess you can close this since it's outside the scope of the bug, but it would be nice if you could specify a wildcard in challenge requirements, like "any firework".

dutchy1001 commented 8 years ago

I think due to all changes that have been made lately to the Minecraft code all these tags/ID's and entity's that have changed is causing a lot of hassle for the challenges. We hope to have something soon to have all items working again properly.

rlf commented 8 years ago

Yup. Also the code that needs to take the items out of the inventory, relies on the item-stacks being specific.

c0wg0d commented 7 years ago

I was hoping to get some help with this bug again. I have updated to Spigot 1.11.2 and uSkyblock alpha16. I've tried all variations I can think of and no matter what it won't detect the fireworks in my inventory as valid.

[uSkyBlock] _7Name: _buSkyBlock
_7Version: _b2.7.3-alpha16
_7Description: _bUltimate SkyBlock v2.7.3-alpha16-08f268-451
_7Language: _ben (en)
_9  State: d=110, r=52, i=3,461, p=5,585, n=false, awe=true
_7Server: _eCraftBukkit git-Spigot-7d78b81-775f1e1 (MC: 1.11.2)
_9  State: online=true, bungee=true
_7------------------------------
_7_dVault _f1.5.6-b49 _7(N/A_7)
_7_dWorldEdit _f6.1.5;4651611 _7(N/A_7)
_7_dWorldGuard _f6.1.3-SNAPSHOT;c904242 _7(N/A_7)
_7_dAsyncWorldEdit _f3.4.5 _7(N/A_7)
_7_dMultiverse-Core _f2.5-b717 _7(N/A_7)
_7------------------------------

I've tried the following:

requiredItems: '401 {Fireworks:{Flight:1}}:192;+4'
requiredItems: '401{Fireworks:{Flight:1}}:192;+4'
requiredItems: '401:192 {Fireworks:{Flight:1}};+4'
requiredItems: '401:192{Fireworks:{Flight:1}};+4'
requiredItems: '401:192;+4 {Fireworks:{Flight:1}}'
requiredItems: '401:192;+4{Fireworks:{Flight:1}}'
rlf commented 7 years ago

According to the code, the correct syntax should be:

requiredItems: '<id>[:<data-value>][{item-meta}]:<amount>[;<operator><increment>]'

Meaning, the stuff you try, should probably be:

requiredItems: '401{Fireworks:{Flight:1}}:192;+4'

Try the /usb nbt command to investigate the actual item, and the meta-information required.

c0wg0d commented 7 years ago

I tried your suggested syntax and when trying to complete the challenge it says I am missing 1 air and will not complete.

rlf commented 7 years ago

Sounds like you have an empty line or something in your requiredItems, can you share your complete challenges.yml through pastebin?

c0wg0d commented 7 years ago

Here is the full config block for the challenge. This is the only challenge giving me a problem.

      fireworker:
        description: 'Craft a large amount of firework rockets with flight duration 1 and no colors or effects.'
        type: onPlayer
        requiredItems: '401{Fireworks:{Flight:1}}:192;+4'
        displayItem: '401'
        takeitem: true
        repeatable: true
        reward:
          items:
          - '173:4'
          - '327:1'
          - '89:8'
          text: 4 blocks of coal, 1 lava bucket, 8 glowstone
          currency: 40
          xp: 40
        repeatReward:
          items:
          - '173:1'
          - '348:4'
          text: 1 block of coal, 4 glowstone dust
          currency: 40
          xp: 40
rlf commented 7 years ago

Just as a test, try having:

fireworker:
        description: 'Craft a large amount of firework rockets with flight duration 1 and no colors or effects.'
        type: onPlayer
        requiredItems: 
        - '401:0{Fireworks:{Flight:1}}:192;+4'

Also, please show the output of holding the appropriate fireworks in your hand, and executing /usb nbt info

c0wg0d commented 7 years ago

I tried adding the :0 to the 401, but sadly that had no effect. It still says it requires 1 Air. Here is the output from /usb nbt info while holding the fireworks crafted with 1 paper and 1 gunpowder:

http://i.imgur.com/iVvcyh6.png

I tried changing the requiredItems to have Flight:1b but that doesn't work either.