Item not added to ItemTag when joining SinglePlayer
JaddotWuzHere opened this issue ยท 6 comments
Intro:
I have another question about tags.
Issue Description:
This question is similar to the setDisplayName question I asked earlier, but I wanted to clarify if it's the same 'solution' or if it's different. I want to add a tag to an item in Minecraft but when I ran the script, there was no error code in the chat, and nothing changed when I ran /ct hand, the tags I added weren't there. Is there anything I did wrong or is it just another 'feature' that hasn't been added yet?
What happens:
Nothing happened, and there was no error in the chat
What you expected to happen:
The item I wanted to add to the tag didn't work
Script used:
https://gist.github.com/Jason-Ding-Programs/81ca5ee03a8687edcbcc179063ce2be8
- Minecraft Version: 1.16.4
- Forge Version: forge-35.1.37
- CraftTweaker Version: 1.16.5-7.1.0.110
- Are you using a server: No, singleplayer world
What does your crafttweaker.log file say?
It is located inside your logs
folder.
Make sure that your script file has a .zs
file extension.
https://gist.github.com/Jason-Ding-Programs/4a10576f4b29f8fa0793d9098c4ca5a4
And yes, it is a .zs
file
I looked at the log and I was pretty sure the tag was added, but it wasn't listed when I ran /ct hand
and it didn't function as a No Tree Punching Knife like I expected it to be so I got confused, but if it doesn't work that way please tell me
If it doesn't, is there a way for me to add an item that functions as a No Tree Punching knife, or any other item for that instance (for example, how to make seeds act as a diamond sword without using texture packs because I'm adding an extra item not just changing the texture of it)? And if CraftTweaker doesn't support this is there some other mod/datapack/other solutions that would do this?
Hm...
It seems like the action is not applied properly.
When you join a world, CraftTweaker effectively runs twice, once on world creation, and once on player join.
For a SinglePlayer world, these two happen right after each other.
If you check your log you can see that there are two Info Entries with Started loading Scripts for Loader 'crafttweaker'!
, one in line 168 and one in 223.
The 2nd (which would be on player join) does not add the knive, so it's possible that that is the reason.
Have you checked if running /reload
while in the world?
CraftTweaker hooks into that command to allow you to reload most of its script files on-the-fly.
Can you check if after using that command the tag is added to the Item?
I know, it's not a "proper" fix to run that command, but it would help us to pin down the exact location of the issue.