Started by
VegaOrionis
on
Topic category: Help with MCreator software
I'd like to create a new variable in the class that will be the new state of the block. I'd like it to be limited to 32, not 25, or in the form of a string. I don't know Java :(
When performing a specific action in the game, I change the value of the NBT tag called "testTag". Then, when the condition is met ("testTag" == 0 , testTag" == 1 etc.), an action should be performed which should set the blockState (of the IntegerProperty variable) (ageC) to the value 0, 1, 2 etc.
https://i.imgur.com/YR1Ir1b.png
The ageC variable is "pot"
https://i.imgur.com/fSiu5te.png
Then in the blockstate directory the bsmkii.json file
{
"variants": {
"pot=0": {
"model": "xxxx:block/bsmkii"
}, "pot=1" : {
"model": "xxxx:block/p1"
},
"pot=2" : {
"model": "xxxx:block/p2"
},
will read the selected block to me. I want to control the type/appearance of the block using the nbt tag.
ufff.... It worked great for me in the previous version of mcreator.
What minecraft version are you on now?
MCreator 2021.2 - Forge 1.15.2
I don't know why but I restarted the game and now it works.... On the one hand I'm happy, but on the other I'm angry why it didn't work before...
oh nice! :3
in version 2021.3 - 1.17.1 nothing works for me anymore... I don't know how to fix it...
sad.. and I wanted to update the already finished mod to a newer version...
yeah... you're going to have trouble doing that, considering how much custom code it has
I just need to somehow create a new variable that can be referenced via NTB TAG.
If I don't find a solution, I'll probably have to do it manually and add dozens of blocks... But I'll somehow finish this mod in 2-3 more versions and publish it :)
https://imgur.com/a/j84ILwO
https://imgur.com/a/g0nrDTH
How can I fix the code so that it doesn't throw errors when creating a new variable?
you've put your code between
implementsandEntityBlockwhen it should go in the body of the class,Oh, indeed! My lack of Java knowledge is taking its toll on me...
https://imgur.com/a/Pz6hvTt
Now more bugs...
did you mean to use
StateDefinitionuppercase S ?