#2x3 Door script mistake
1 messages ยท Page 1 of 1 (latest)
I'll probably be able to answer when I get home. In about an hour.
Okay
and could you send the whole code because in this file there is only class
@spare laurel
Is this only, isn't relevant
So..
Firstly, it is not very good that your methods accept 10000000 parameters. In this case, it is better to make an object with different parameters
Secondly, you use one class for all doors, this is not very good
There may be a mistake in this
I would do it like this: a BigDoor class with static methods register and get. register - takes a door pattern and registers it in a global variable. get - takes a Block parameter and based on it gets the door blocks associated with this block and returns the BigDoor class. The BigDoor class would have methods such as open(), close(), rotate() and the like for convenient use. Then in a separate file you would write the code for registering the door and then, based on events, make the door control (that is, closing and opening via BigDoor.get(block).open())
Again, I would do it that way. But it's up to you to decide what's more convenient. In any case, I think the error is because you're using one object for all doors (i.e. declaring a constant at the beginning of the code and then using it for all doors)
And by the way, now I also want to create custom doors, so I think I'll make some kind of template for this and put it on dev-resources
Do not steal my code, I showed it to you to help me not to copy me
I didn't say I would copy your code. I just said I liked the idea of โโmaking big doors and that I would probably make a template for it and put it on dev-resources
๐
found this funny
Read what they said ๐ญ
They said they would make a template on the idea not taking your code