Zergatul / cheatutils

MIT License
41 stars 16 forks source link

useItem, non [a-z0-9/._-] character crash. #74

Closed Ioney closed 6 months ago

Ioney commented 7 months ago

blockAutomation.useItem("blackstone,netherrack"); will crash the game

[Render thread/ERROR]: Unreported exception thrown!
net.minecraft.class_151: Non [a-z0-9/._-] character in path of location: minecraft:blackstone,netherrack
at net.minecraft.class_2960.method_45137(class_2960.java:252) ~[client-intermediary.jar:?]
at net.minecraft.class_2960.<init>(class_2960.java:47) ~[client-intermediary.jar:?]
at net.minecraft.class_2960.<init>(class_2960.java:51) ~[client-intermediary.jar:?]
at net.minecraft.class_2960.<init>(class_2960.java:56) ~[client-intermediary.jar:?]
at com.zergatul.cheatutils.modules.scripting.BlockAutomation.onClientTickEnd(BlockAutomation.java:153) ~[zergatul.cheatutils-2.13.1-fabric-1.20.4.jar:?]
at com.zergatul.cheatutils.common.events.SimpleEventHandler.trigger(SimpleEventHandler.java:16) ~[zergatul.cheatutils-2.13.1-fabric-1.20.4.jar:?]
at net.minecraft.class_310.handler$zjj000$cheatutils$onAfterTick(class_310.java:3842) ~[client-intermediary.jar:?]
at net.minecraft.class_310.method_1574(class_310.java:2067) ~[client-intermediary.jar:?]
at net.minecraft.class_310.method_1523(class_310.java:1289) ~[client-intermediary.jar:?]
at net.minecraft.class_310.method_1514(class_310.java:888) ~[client-intermediary.jar:?]
at net.minecraft.client.main.Main.main(Main.java:265) ~[1.20.4-0.15.6.jar:?]
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) ~[fabric-loader-0.15.6.jar:?]
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) ~[fabric-loader-0.15.6.jar:?]
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) ~[fabric-loader-0.15.6.jar:?]
Zergatul commented 7 months ago

Thanks, this is valid issue. For your task you can use blockAutomation.useItem(new string[] { "blackstone", "netherrack" });

Zergatul commented 6 months ago

Fixed in 2.13.2