|
| 1 | +<#-- |
| 2 | + # MCreator (https://mcreator.net/) |
| 3 | + # Copyright (C) 2012-2020, Pylo |
| 4 | + # Copyright (C) 2020-2024, 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 | +package ${package}.client.model; |
| 33 | + |
| 34 | +@SideOnly(Side.CLIENT) |
| 35 | +${model.toString() |
| 36 | + .replace("public static class", "public class") |
| 37 | + .replace("ModelRenderer ", "ModelRenderer ") |
| 38 | + .replace("ModelRenderer(", "ModelRenderer(") |
| 39 | + .replace("private final ModelRenderer", "public final ModelRenderer") |
| 40 | + .replaceAll("setRotationAngles\\(float[\\s\\n\\r]+f,[\\s\\n\\r]+float[\\s\\n\\r]+f1,[\\s\\n\\r]+float[\\s\\n\\r]+f2,[\\s\\n\\r]+float[\\s\\n\\r]+f3,[\\s\\n\\r]+float[\\s\\n\\r]+f4,[\\s\\n\\r]+float[\\s\\n\\r]+f5,[\\s\\n\\r]+Entity[\\s\\n\\r]+.*?\\)", |
| 41 | + "setRotationAngles(f, f1, f2, f3, f4, f5)") |
| 42 | + .replace("setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity e)", "setRotationAngles(f, f1, f2, f3, f4, f5)") |
| 43 | + .replace("setRotationAngles(Entity e, float f, float f1, float f2, float f3, float f4, float f5)", "setRotationAngles(f, f1, f2, f3, f4, f5)") |
| 44 | + .replace("setRotationAngles(f, f1, f2, f3, f4, f5, e)", "setRotationAngles(f, f1, f2, f3, f4, f5)") |
| 45 | + ?keep_before_last("}")} |
| 46 | + |
| 47 | + <#if !model.contains("setRotationAngles")> |
| 48 | + @Override public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5) {} |
| 49 | + </#if> |
| 50 | +} |
| 51 | +<#-- @formatter:on --> |
0 commit comments