-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
copy from other GUI #112
Comments
This could be added, but I'm not sure how useful it would be. You could always use a function with a player argument to create the GUI. The only thing I could really see being beneficial is performance impact maybe? But I don't think that's really an issue 🙂 |
I think something you could do instead of a copy is add a new parse tag for "template" like how "removeable" is starting from 1.3 create [a] [new] [:template] gui [[with id[entifier]] %string%] with %inventory% [removable:(and|with) ([re]move[e]able|stealable) items] [(and|with) shape %strings%] since I believe having a template is basically the same as this but something more people who would use and find more understandable. A fully fleshed out example of it could be something like this. set {_shape::*} to "xxxxxxxxx","x1111111x","x1111111x", and "xxxxxxxxx"
create template gui with id "border" with chest inventory with 4 rows with shape {_shape::*}:
format gui slot "x" with black glass pane named " "
unformat gui slot "1"
command /use_template:
trigger:
create a new gui using template "border":
set name of the gui to "My Template GUI"
edit the gui:
format next gui slot with lava bucket
format gui slot 11 with water bucket While as you stated only known good use would be performance. The other use is using it as a template for mass creation of guis such as shops |
Hello.
Could you add copying slots from other GUI when creating a new GUI?
example code:
The text was updated successfully, but these errors were encountered: