⁠
orlando sangiovanni: Add Fabric 26.1+ class templates (Mojmap) (#2639 )
* Added freemarker templates for 26.1+ fabric mods and renamed old versions in "NAME (1.21.11-).java.xyza", enchantment 26.1+ template is not changed yet for my information miss
* Set FabricEnchantment (26.1+).java.ft content according to NeoForgeEnchantment.java.ft but both are not functionals in newer versions, also renamed FabricStatusEffect (26.1+).java.xyza to FabricMobEffect (26.1+).java.xyza for coherence
* Added a Minecraft version parsing for fabric with method computeVersion in FabricModule.kt
* Fixed typos
* Added gradle variables support and minecraft version for neoforge for remove enchantment template in 1.21+
* Added new Json template for 1.21+ enchantments
instead of unfunctional java classes with a new action for minecraft resources creation containing for now only enchantments templates
(in a future pr i think that i'll expand it, changing from Minecraft Enchantment to Minecraft Json and adding blockstates, models, etc. templates)
* Improved resource modid detection
resource root's modid now detected scanning the path instead of choosing ever the first modid in project modids
* Update action text for Minecraft Json creation
* Clean up commented code in MinecraftResourceCreateAction
Removed commented-out code related to module and Minecraft version checks.
* Cleaned Code and Deleting Rendundant Version Detecting Code
* Remove fabricMinecraftVersion from FabricModule
Remove unused fabricMinecraftVersion property.
* Removed Unused Imports and Deleted Json Template
* Resolved unrelated formatting changes
* Fix formatting of constructor in ForgeEnchantment template
* Default to newest template if mcVersion is null
---------
Co-authored-by: joe <[email protected]>
* Added freemarker templates for 26.1+ fabric mods and renamed old versions in "NAME (1.21.11-).java.xyza", enchantment 26.1+ template is not changed yet for my information miss
* Set FabricEnchantment (26.1+).java.ft content according to NeoForgeEnchantment.java.ft but both are not functionals in newer versions, also renamed FabricStatusEffect (26.1+).java.xyza to FabricMobEffect (26.1+).java.xyza for coherence
* Added a Minecraft version parsing for fabric with method computeVersion in FabricModule.kt
* Fixed typos
* Added gradle variables support and minecraft version for neoforge for remove enchantment template in 1.21+
* Added new Json template for 1.21+ enchantments
instead of unfunctional java classes with a new action for minecraft resources creation containing for now only enchantments templates
(in a future pr i think that i'll expand it, changing from Minecraft Enchantment to Minecraft Json and adding blockstates, models, etc. templates)
* Improved resource modid detection
resource root's modid now detected scanning the path instead of choosing ever the first modid in project modids
* Update action text for Minecraft Json creation
* Clean up commented code in MinecraftResourceCreateAction
Removed commented-out code related to module and Minecraft version checks.
* Cleaned Code and Deleting Rendundant Version Detecting Code
* Remove fabricMinecraftVersion from FabricModule
Remove unused fabricMinecraftVersion property.
* Removed Unused Imports and Deleted Json Template
* Resolved unrelated formatting changes
* Fix formatting of constructor in ForgeEnchantment template
* Default to newest template if mcVersion is null
---------
Co-authored-by: joe <[email protected]>
- #if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
- #parse("File Header.java")
-
- import net.minecraft.enchantment.Enchantment;
- import net.minecraft.enchantment.EnchantmentTarget;
- import net.minecraft.entity.EquipmentSlot;
-
- public class ${NAME} extends Enchantment {
- public ${NAME}(Rarity weight, EnchantmentTarget type, EquipmentSlot[] slotTypes) {
- super(weight, type, slotTypes);
- }
- }