[1.12.2] [Issue?] Block-Constructor (Void Member)
accessdenied0 opened this issue ยท 3 comments
Dear ContentTweaker Team,
I'm not sure if this Mod is still under maintenance for 1.12.2, but I feel like I should report this:
I got an issue with the Block-Constructor.
Everything works fine, but soon I try to stack Commands to create dynamic a set of blocks, I get issues with certain members.
VanillaFactory.createBlock("basic_example_block", <blockmaterial:iron>).setBlockSoundType(<soundtype:iron>).setToolLevel(2).setEntitySpawnable(false).register();
even it is defined in the documentation as valid member, the construction fails with the output "void has no member"
The issue seem to be with a few commands, but I only know for certain it for:
setBlockSoundType()
setGlowing()
Probably there are more.
I didn't test it in depth with Items and other members, but the Item-constructor has an issue with "setGlowing", too
Maybe I do something wrong, or the member is called differently,
but I would like to avoid variables for each item for dynamic (dummy/crafting items) generation.
I thank in advance for any input and help
not a bug - you have to make an extra variable
sorry, i couldnt get the pr to pass :/
I did.
#loader contenttweaker
[...]
VanillaFactory.createBlock("basic_example_block", <blockmaterial:iron>).setBlockSoundType(<soundtype:iron>).setToolLevel(2).setEntitySpawnable(false).register();
[...]
There is nothing more to it, because if changed like this...
'VanillaFactory.createBlock("basic_example_block", <blockmaterial:iron>).register();
it works.