Added customdata

Added custom data check to the panel generation allowing automatic setup for custom resource items. This was added inside the itemcreation file and requires 1.14 or above to work.
This commit is contained in:
TinyTank800 2023-03-27 20:31:48 -07:00 committed by GitHub
parent bb08202e7b
commit 1738be4950
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -481,6 +481,9 @@ public class ItemCreation {
}
file.set("panels." + panelName + ".item." + i + ".name", Objects.requireNonNull(cont.getItemMeta()).getDisplayName());
file.set("panels." + panelName + ".item." + i + ".lore", Objects.requireNonNull(cont.getItemMeta()).getLore());
if(plugin.legacy.LOCAL_VERSION.greaterThanOrEqualTo(MinecraftVersions.v1_14)){
file.set("panels." + panelName + ".item." + i + ".customdata", Objects.requireNonNull(cont.getItemMeta()).getCustomModelData());
}
}catch(Exception n){
//skip over an item that spits an error
}