TwitchSpawn

TwitchSpawn

411k Downloads

NBT Tags not taken in count with the /setblock command

JimiIT92 opened this issue ยท 8 comments

commented

Describe the bug
When using the EXECUTE function and doing a setblock command with NBT Tags in it, the NBT are ignore

To Reproduce
Steps to reproduce the behavior:

  1. Set a rule like EXECUTE %/setblock ~ ~ ~ minecraft:chest{CustomName:"\"test\""} replace%
    ON Donation
    WITH amount >= 1000
  2. Open the game and simulate the event doing this
    /twitchspawn simulate {event:"donation", amount:1000}
  3. The chest is placed in the world but has no Custom Name. But if you run this command in game the chest is placed WITH the Custom Name, so i guess that NBTs are lost when parsing the /setblock command.

Expected behavior
The command described by the EXECUTE action should run as it would run by typing it manually. Haven't tested with other commands that has NBTs but could be the same behavior

Version (please complete the following information):

  • OS: Windows 10
  • TwitchSpawn Version: 1.3.6
  • Forge Version: 28.0.93
commented

{CustomName:""test""} is a malformed JSON. Could you please try to replace it with {CustomName:"\"test\""}?

commented

Ops, Github parsed the \. Anyway in the ruleset the json is like that (it should now be visible in the original post)

commented

Oh oopsies. Iโ€™ll be reproducing this tonight

commented

Could you share if the console has any clue about what could be gone wrong? EXECUTE action logs the raw command it executes beforehand

commented

When executing the action the console logs this

[19:26:40] [Timer-0/INFO] [ne.pr.ig.tw.TwitchSpawn/]: Executed (Status:0) -> /setblock ~ ~ ~ minecraft:chest{CustomName:"\"test\""} replace [19:26:44] [Timer-0/INFO] [ne.pr.ig.tw.TwitchSpawn/]: ExecuteAction action performed for Dev

This of course happens if you set the nbt value directly or if you use a placeholder

commented

After a long debugging night, finally it must be fixed with 37338ab!
Thanks for pointing the issue out ๐ŸŽ‰

commented

Glad to hear that, when should we expect a new release with this fix?

commented

Iโ€™m currently on vacation. But I am planning a release within a week or so ๐ŸŽ‰