NBT Tags not taken in count with the /setblock command
JimiIT92 opened this issue ยท 8 comments
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:
- Set a rule like EXECUTE %/setblock ~ ~ ~ minecraft:chest{CustomName:"\"test\""} replace%
ON Donation
WITH amount >= 1000 - Open the game and simulate the event doing this
/twitchspawn simulate {event:"donation", amount:1000} - 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
{CustomName:""test""}
is a malformed JSON. Could you please try to replace it with {CustomName:"\"test\""}
?
Ops, Github parsed the \. Anyway in the ruleset the json is like that (it should now be visible in the original post)
Could you share if the console has any clue about what could be gone wrong? EXECUTE action logs the raw command it executes beforehand
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
After a long debugging night, finally it must be fixed with 37338ab!
Thanks for pointing the issue out ๐