ZenScript icon indicating copy to clipboard operation
ZenScript copied to clipboard

Support for soundtypes

Open rlnt opened this issue 5 years ago • 4 comments

Would be nice if soundtypes would be supported in the dump probe creates.

ContentTweaker has a feature that allows modpack makers to create custom blocks. You can define a block sound type with a bracket handler. These bracket handlers are not yet dumped and therefor ZenScript shows an error that it's not available.

Example code:

var infusionBlock = VanillaFactory.createBlock("infusion_block", <blockmaterial:rock>);
infusionBlock.setBlockSoundType(<soundtype:stone>);
infusionBlock.register();

rlnt avatar May 01 '20 14:05 rlnt

Yeah, that's ContentTweaker, which uses a new loader as I know. It would be a new feature, which requires an update of both Probe and ZenScript.

Transferring to the extension repo for further development. But recently(more precisely, before May.20), I have many things to do and maybe can only do some bug fixes for the extension. :)

Yesterday17 avatar May 01 '20 15:05 Yesterday17

been struggling with this too, really wish there was support for soundtype dumping. Is there anyway i could hide the errors for the soundtypes in the meantime? its pretty jarring D:

EDIT: nevermind! #ignoreBracketErrors works c:

hope this soundtype enhancement can be implemented soon! would be super cool

Landiie avatar Jun 20 '20 02:06 Landiie

A new strategy will be introduced to ZenScript in the next release to help the extension distinguish whether a bad bracketHandler is an unknown type.

What you need to do only is to disable modIdItemCompletion in options. This might be frustrating if you're used to using bracketHandler such as <minecraft:white_wool> to refer to white wool without the item: prefix(as it's optional). You may need to add all those prefixes manually.

The reason is quite simple: if you use <modid:item_name> to refer to items, it's impossible for the extension to know whether modid is an unknown type of bracketHandler, or just a mistyped normal bracketHandler.

In short, after disabling modIdItemCompletion, no error would be produced by unknown bracketHandlers.

Yesterday17 avatar Jun 24 '20 16:06 Yesterday17

Ive disabled the modIdItemCompletion although i use your probe mod and i do quite enjoy the auto-fill features it has so i can do scripts without having to open the game sometimes, its really a time saver considering my pack's load times!

So ill just stick with putting #ignoreBracketHandlers on my script though until there is some workaround or like you said; will just flag the bracket as unknown rather than bad so there is no errors. Thanks for the input though!!

Landiie avatar Jun 26 '20 07:06 Landiie