diff --git a/src/main/kotlin/insight/generation/MinecraftClassCreateAction.kt b/src/main/kotlin/insight/generation/MinecraftClassCreateAction.kt index eafac1915..c662499b6 100644 --- a/src/main/kotlin/insight/generation/MinecraftClassCreateAction.kt +++ b/src/main/kotlin/insight/generation/MinecraftClassCreateAction.kt @@ -55,6 +55,7 @@ class MinecraftClassCreateAction : builder.addKind("Block", icon, MinecraftTemplates.FORGE_BLOCK_TEMPLATE) builder.addKind("Item", icon, MinecraftTemplates.FORGE_ITEM_TEMPLATE) builder.addKind("Packet", icon, MinecraftTemplates.FORGE_PACKET_TEMPLATE) + builder.addKind("Enchantment", icon, MinecraftTemplates.FORGE_ENCHANTMENT_TEMPLATE) } if (isFabric) { val icon = PlatformAssets.FABRIC_ICON diff --git a/src/main/kotlin/util/MinecraftTemplates.kt b/src/main/kotlin/util/MinecraftTemplates.kt index f789b1adc..806d66e51 100644 --- a/src/main/kotlin/util/MinecraftTemplates.kt +++ b/src/main/kotlin/util/MinecraftTemplates.kt @@ -136,6 +136,7 @@ class MinecraftTemplates : FileTemplateGroupDescriptorFactory { group.addTemplate(skeletonGroup) FileTemplateGroupDescriptor("Forge", PlatformAssets.FORGE_ICON).let { forgeSkeletonGroup -> skeletonGroup.addTemplate(forgeSkeletonGroup) + forgeSkeletonGroup.addTemplate(FileTemplateDescriptor(FORGE_ENCHANTMENT_TEMPLATE)) forgeSkeletonGroup.addTemplate(FileTemplateDescriptor(FORGE_PACKET_TEMPLATE)) forgeSkeletonGroup.addTemplate(FileTemplateDescriptor(FORGE_BLOCK_TEMPLATE)) forgeSkeletonGroup.addTemplate(FileTemplateDescriptor(FORGE_ITEM_TEMPLATE)) @@ -237,6 +238,7 @@ class MinecraftTemplates : FileTemplateGroupDescriptorFactory { const val FORGE_BLOCK_TEMPLATE = "ForgeBlock.java" const val FORGE_ITEM_TEMPLATE = "ForgeItem.java" const val FORGE_PACKET_TEMPLATE = "ForgePacket.java" + const val FORGE_ENCHANTMENT_TEMPLATE = "ForgeEnchantment.java" const val FABRIC_BLOCK_TEMPLATE = "FabricBlock.java" const val FABRIC_ITEM_TEMPLATE = "FabricItem.java" diff --git a/src/main/resources/fileTemplates/j2ee/skeleton/forge/ForgeEnchantment.java.ft b/src/main/resources/fileTemplates/j2ee/skeleton/forge/ForgeEnchantment.java.ft new file mode 100644 index 000000000..834f277d6 --- /dev/null +++ b/src/main/resources/fileTemplates/j2ee/skeleton/forge/ForgeEnchantment.java.ft @@ -0,0 +1,13 @@ +#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end +#parse("File Header.java") + +import net.minecraft.enchantment.Enchantment; +import net.minecraft.enchantment.EnchantmentType; +import net.minecraft.inventory.EquipmentSlotType; + +public class ${NAME} extends Enchantment { + public ${NAME}(Rarity rarityIn, EnchantmentType typeIn, EquipmentSlotType[] slots) { + super(rarityIn, typeIn, slots); + } +} + diff --git a/src/main/resources/fileTemplates/j2ee/skeleton/forge/ForgeEnchantment.java.html b/src/main/resources/fileTemplates/j2ee/skeleton/forge/ForgeEnchantment.java.html new file mode 100644 index 000000000..490472896 --- /dev/null +++ b/src/main/resources/fileTemplates/j2ee/skeleton/forge/ForgeEnchantment.java.html @@ -0,0 +1,15 @@ + + + + + Forge style enchantment class + +