-
-
Notifications
You must be signed in to change notification settings - Fork 113
Added Item_Model property and mechanism #2805
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
Conversation
| if (mechanism.hasValue()) { | ||
| meta.setItemModel(NamespacedKey.fromString(value.asString())); | ||
| } | ||
| else { | ||
| meta.setItemModel(null); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be ternary
| import com.denizenscript.denizen.nms.NMSHandler; | ||
| import com.denizenscript.denizen.objects.ItemTag; | ||
| import com.denizenscript.denizencore.objects.Mechanism; | ||
| import com.denizenscript.denizencore.objects.ObjectTag; | ||
| import com.denizenscript.denizencore.objects.core.ElementTag; | ||
| import com.denizenscript.denizencore.objects.core.ListTag; | ||
| import com.denizenscript.denizencore.objects.properties.Property; | ||
| import com.denizenscript.denizencore.objects.properties.PropertyParser; | ||
| import com.denizenscript.denizencore.tags.Attribute; | ||
| import com.denizenscript.denizencore.tags.core.EscapeTagUtil; | ||
| import com.denizenscript.denizencore.utilities.CoreUtilities; | ||
| import org.bukkit.NamespacedKey; | ||
| import org.bukkit.inventory.meta.ItemMeta; | ||
|
|
||
| import java.util.List; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should clean up imports, a lot of these aren't used.
|
Thank you for the PR, but properties for item components will have a dedicated system added for them (see #2760), so these will need to wait until that system is merged. |
Hello,
I decided to switch my server from using custom_model_data towards using Item-Models where possible and thought it would be a convenient feature to have a mechanism for this built into Denizen.