|
| 1 | +<#-- |
| 2 | + # MCreator (https://mcreator.net/) |
| 3 | + # Copyright (C) 2012-2020, Pylo |
| 4 | + # Copyright (C) 2020-2025, Pylo, opensource contributors |
| 5 | + # |
| 6 | + # This program is free software: you can redistribute it and/or modify |
| 7 | + # it under the terms of the GNU General Public License as published by |
| 8 | + # the Free Software Foundation, either version 3 of the License, or |
| 9 | + # (at your option) any later version. |
| 10 | + # |
| 11 | + # This program is distributed in the hope that it will be useful, |
| 12 | + # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | + # GNU General Public License for more details. |
| 15 | + # |
| 16 | + # You should have received a copy of the GNU General Public License |
| 17 | + # along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 18 | + # |
| 19 | + # Additional permission for code generator templates (*.ftl files) |
| 20 | + # |
| 21 | + # As a special exception, you may create a larger work that contains part or |
| 22 | + # all of the MCreator code generator templates (*.ftl files) and distribute |
| 23 | + # that work under terms of your choice, so long as that work isn't itself a |
| 24 | + # template for code generation. Alternatively, if you modify or redistribute |
| 25 | + # the template itself, you may (at your option) remove this special exception, |
| 26 | + # which will cause the template and the resulting code generator output files |
| 27 | + # to be licensed under the GNU General Public License without this special |
| 28 | + # exception. |
| 29 | +--> |
| 30 | + |
| 31 | +<#-- @formatter:off --> |
| 32 | +/* |
| 33 | + * MCreator note: This file will be REGENERATED on each build. |
| 34 | + */ |
| 35 | +package ${package}.init; |
| 36 | +public class ${JavaModName}DamageTypes { |
| 37 | + |
| 38 | + <#list damagetypes as damageType> |
| 39 | + public static final DamageSource ${damageType.getModElement().getRegistryNameUpper()} = (new DamageSource("${damageType.getModElement()}"))<#if damageType.scaling != "false">.setDifficultyScaled()</#if><#if damageType.effects == "burning">.setFireDamage()<#elseif damageType.effects == "drowning" || damageType.effects == "hurt">.setDamageBypassesArmor()<#elseif damageType.effects == "thorns">.setMagicDamage()</#if>; |
| 40 | + </#list> |
| 41 | +} |
| 42 | +<#-- @formatter:on --> |
0 commit comments