CraftTweaker

CraftTweaker

151M Downloads

I did a give command and it "corrupted" my save

TeKett opened this issue ยท 1 comments

commented

Issue description

I tried to give myself a chicken from the chicken mod. I copied another chicken so it should have been fine
<item:chickens:chicken_item>.withTag({growth: 10 as int, strength: 10 as int, ChickenType: {id: "chickens:blaze_chicken" as string}, gain: 10 as int})

and then just changed the id:
<item:chickens:chicken_item>.withTag({growth: 10 as int, strength: 10 as int, ChickenType: {id: "chickens:netherite_chicken" as string}, gain: 10 as int})

This resulted in a crash when i tried to give myself the chicken:
net.minecraft.ResourceLocationException: Non [a-z0-9_.-] character in namespace of location: "chickens:netherite_chicken"

Now i cant open the world since i get the same crash.

Steps to reproduce

No response

Script used

none

The crafttweaker.log file

It says nothing since it got reset when starting again

Minecraft version

1.18

Modloader

Forge

Modloader version

40.1.92

CraftTweaker version

9.1.200

Other relevant information

No response

The latest.log file

https://pastebin.com/pgtnTg4j

commented

try this:

<item:chickens:chicken_item>.withTag({growth: 10, strength: 10, ChickenType: {id: "chickens:netherite_chicken"}, gain: 10})

As for your world crash, nothing I can do about that, you would need to edit the nbt of your player to remove the erroring item, or ask the chickens author to add a safety check for invalid ids.