From dd17771d65b29c10b478a1bfaff0c8fd8a90eb20 Mon Sep 17 00:00:00 2001 From: Atsuishio <842960157@qq.com> Date: Sun, 8 Jun 2025 00:22:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96javelin=E7=9A=84=E7=AC=AC?= =?UTF-8?q?=E4=B8=89=E4=BA=BA=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client/model/item/JavelinItemModel.java | 10 ++ .../superbwarfare/geo/lod/javelin.geo.json | 127 +++++++++++++++++ .../models/displaysettings/javelin.item.json | 72 ++++++---- .../superbwarfare/models/lod/javelin.json | 131 ------------------ 4 files changed, 184 insertions(+), 156 deletions(-) create mode 100644 src/main/resources/assets/superbwarfare/geo/lod/javelin.geo.json delete mode 100644 src/main/resources/assets/superbwarfare/models/lod/javelin.json diff --git a/src/main/java/com/atsuishio/superbwarfare/client/model/item/JavelinItemModel.java b/src/main/java/com/atsuishio/superbwarfare/client/model/item/JavelinItemModel.java index b86700594..d974ac90c 100644 --- a/src/main/java/com/atsuishio/superbwarfare/client/model/item/JavelinItemModel.java +++ b/src/main/java/com/atsuishio/superbwarfare/client/model/item/JavelinItemModel.java @@ -29,6 +29,16 @@ public class JavelinItemModel extends CustomGunModel { return Mod.loc("textures/item/javelin.png"); } + @Override + public ResourceLocation getLODModelResource(JavelinItem animatable) { + return Mod.loc("geo/lod/javelin.geo.json"); + } + + @Override + public ResourceLocation getLODTextureResource(JavelinItem animatable) { + return Mod.loc("textures/item/lod/javelin.png"); + } + @Override public void setCustomAnimations(JavelinItem animatable, long instanceId, AnimationState animationState) { Player player = Minecraft.getInstance().player; diff --git a/src/main/resources/assets/superbwarfare/geo/lod/javelin.geo.json b/src/main/resources/assets/superbwarfare/geo/lod/javelin.geo.json new file mode 100644 index 000000000..2af9af8c3 --- /dev/null +++ b/src/main/resources/assets/superbwarfare/geo/lod/javelin.geo.json @@ -0,0 +1,127 @@ +{ + "format_version": "1.12.0", + "minecraft:geometry": [ + { + "description": { + "identifier": "geometry.javelin", + "texture_width": 64, + "texture_height": 64, + "visible_bounds_width": 3, + "visible_bounds_height": 3.5, + "visible_bounds_offset": [0, 1.25, 0] + }, + "bones": [ + { + "name": "group", + "pivot": [1, 3, -2], + "cubes": [ + { + "origin": [-8.55, 8.14, -4.86], + "size": [1.4, 2.86, 5.72], + "pivot": [0, 8.14, -2], + "rotation": [-14, 0, 0], + "uv": { + "north": {"uv": [34, 32], "uv_size": [5, 2]}, + "east": {"uv": [35, 0], "uv_size": [4, 2]}, + "south": {"uv": [34, 34], "uv_size": [5, 2]}, + "west": {"uv": [35, 2], "uv_size": [4, 2]}, + "up": {"uv": [10, 30], "uv_size": [5, 4]}, + "down": {"uv": [15, 35], "uv_size": [5, -4]} + } + }, + { + "origin": [-9.265, 4.085, 23.74], + "size": [9.295, 9.295, 2.86], + "pivot": [5.75, 4.8, -2], + "rotation": [-14, 0, 0], + "uv": { + "north": {"uv": [18, 24], "uv_size": [7, 7]}, + "east": {"uv": [27, 33], "uv_size": [2, 7]}, + "south": {"uv": [25, 10], "uv_size": [7, 7]}, + "west": {"uv": [10, 34], "uv_size": [2, 7]}, + "up": {"uv": [34, 19], "uv_size": [7, 2]}, + "down": {"uv": [34, 23], "uv_size": [7, -2]} + } + }, + { + "origin": [-7.15, -1.29, -4.86], + "size": [11.44, 11.44, 5.72], + "uv": { + "north": {"uv": [10, 10], "uv_size": [8, 8]}, + "east": {"uv": [25, 17], "uv_size": [4, 8]}, + "south": {"uv": [10, 18], "uv_size": [8, 8]}, + "west": {"uv": [25, 25], "uv_size": [4, 8]}, + "up": {"uv": [10, 26], "uv_size": [8, 4]}, + "down": {"uv": [27, 4], "uv_size": [8, -4]} + } + }, + { + "origin": [4.29, 0.14, -4.86], + "size": [4.29, 10.01, 2.86], + "uv": { + "north": {"uv": [29, 22], "uv_size": [3, 7]}, + "east": {"uv": [23, 31], "uv_size": [2, 7]}, + "south": {"uv": [29, 29], "uv_size": [3, 7]}, + "west": {"uv": [32, 22], "uv_size": [2, 7]}, + "up": {"uv": [35, 4], "uv_size": [3, 2]}, + "down": {"uv": [35, 8], "uv_size": [3, -2]} + } + }, + { + "origin": [4.29, 3, -2], + "size": [4.29, 7.15, 2.86], + "uv": { + "north": {"uv": [20, 31], "uv_size": [3, 5]}, + "east": {"uv": [12, 34], "uv_size": [2, 5]}, + "south": {"uv": [32, 4], "uv_size": [3, 5]}, + "west": {"uv": [34, 23], "uv_size": [2, 5]}, + "up": {"uv": [14, 35], "uv_size": [3, 2]}, + "down": {"uv": [17, 37], "uv_size": [3, -2]} + } + }, + { + "origin": [-5.72, -4.15, -3.43], + "size": [7.15, 2.86, 4.29], + "uv": { + "north": {"uv": [34, 28], "uv_size": [5, 2]}, + "east": {"uv": [20, 36], "uv_size": [3, 2]}, + "south": {"uv": [34, 30], "uv_size": [5, 2]}, + "west": {"uv": [36, 23], "uv_size": [3, 2]}, + "up": {"uv": [32, 9], "uv_size": [5, 3]}, + "down": {"uv": [32, 15], "uv_size": [5, -3]} + } + }, + { + "origin": [-7.835, 5.515, -14.87], + "size": [6.435, 6.435, 38.61], + "pivot": [5.75, 4.8, -2], + "rotation": [-14, 0, 0], + "uv": { + "north": {"uv": [27, 4], "uv_size": [5, 5]}, + "east": {"uv": [0, 0], "uv_size": [27, 5]}, + "south": {"uv": [29, 17], "uv_size": [5, 5]}, + "west": {"uv": [0, 5], "uv_size": [27, 5]}, + "up": {"uv": [0, 10], "uv_size": [5, 27]}, + "down": {"uv": [5, 37], "uv_size": [5, -27]} + } + }, + { + "origin": [-9.265, 4.085, -17.73], + "size": [9.295, 9.295, 2.86], + "pivot": [5.75, 4.8, -2], + "rotation": [-14, 0, 0], + "uv": { + "north": {"uv": [18, 10], "uv_size": [7, 7]}, + "east": {"uv": [32, 29], "uv_size": [2, 7]}, + "south": {"uv": [18, 17], "uv_size": [7, 7]}, + "west": {"uv": [25, 33], "uv_size": [2, 7]}, + "up": {"uv": [32, 15], "uv_size": [7, 2]}, + "down": {"uv": [34, 19], "uv_size": [7, -2]} + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/superbwarfare/models/displaysettings/javelin.item.json b/src/main/resources/assets/superbwarfare/models/displaysettings/javelin.item.json index 76556e937..aeb9e029a 100644 --- a/src/main/resources/assets/superbwarfare/models/displaysettings/javelin.item.json +++ b/src/main/resources/assets/superbwarfare/models/displaysettings/javelin.item.json @@ -7,20 +7,6 @@ ], "gui_light": "front", "display": { - "thirdperson_righthand": { - "translation": [ - -5.5, - -2.25, - 3.75 - ] - }, - "thirdperson_lefthand": { - "scale": [ - 0, - 0, - 0 - ] - }, "firstperson_righthand": { "rotation": [ 0, @@ -40,21 +26,57 @@ 0 ] }, - "gui": { - "rotation": [ - 165.69, - -39.63, - 178.66 - ], + "thirdperson_righthand": { "translation": [ - 3.5, -2.5, - 0 + -2, + 3 ], "scale": [ - 0.45, - 0.45, - 0.45 + 0.75, + 0.75, + 0.75 + ] + }, + "ground": { + "translation": [ + 0, + 3, + -3.75 + ], + "scale": [ + 0.8, + 0.8, + 0.8 + ] + }, + "head": { + "translation": [ + 4.75, + -6, + -8.25 + ], + "scale": [ + 1.3, + 1.3, + 1.3 + ] + }, + "fixed": { + "rotation": [ + 0, + -90, + 0 + ], + "translation": [ + 9, + -6, + -9.75 + ], + "scale": [ + 1.5, + 1.5, + 1.5 ] } } diff --git a/src/main/resources/assets/superbwarfare/models/lod/javelin.json b/src/main/resources/assets/superbwarfare/models/lod/javelin.json deleted file mode 100644 index c4ef42ad7..000000000 --- a/src/main/resources/assets/superbwarfare/models/lod/javelin.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "credit": "Made with Blockbench", - "texture_size": [64, 64], - "textures": { - "0": "superbwarfare:item/lod/javelin", - "particle": "superbwarfare:item/lod/javelin" - }, - "elements": [ - { - "from": [4, -1, 4], - "to": [12, 7, 8], - "rotation": {"angle": 0, "axis": "y", "origin": [7, 0, 6]}, - "faces": { - "north": {"uv": [2.5, 2.5, 4.5, 4.5], "texture": "#0"}, - "east": {"uv": [6.25, 4.25, 7.25, 6.25], "texture": "#0"}, - "south": {"uv": [2.5, 4.5, 4.5, 6.5], "texture": "#0"}, - "west": {"uv": [6.25, 6.25, 7.25, 8.25], "texture": "#0"}, - "up": {"uv": [4.5, 7.5, 2.5, 6.5], "texture": "#0"}, - "down": {"uv": [8.75, 0, 6.75, 1], "texture": "#0"} - } - }, - { - "from": [1, 0, 4], - "to": [4, 7, 6], - "rotation": {"angle": 0, "axis": "y", "origin": [7, 0, 6]}, - "faces": { - "north": {"uv": [7.25, 5.5, 8, 7.25], "texture": "#0"}, - "east": {"uv": [5.75, 7.75, 6.25, 9.5], "texture": "#0"}, - "south": {"uv": [7.25, 7.25, 8, 9], "texture": "#0"}, - "west": {"uv": [8, 5.5, 8.5, 7.25], "texture": "#0"}, - "up": {"uv": [9.5, 1.5, 8.75, 1], "texture": "#0"}, - "down": {"uv": [9.5, 1.5, 8.75, 2], "texture": "#0"} - } - }, - { - "from": [1, 2, 6], - "to": [4, 7, 8], - "rotation": {"angle": 0, "axis": "y", "origin": [7, 0, 6]}, - "faces": { - "north": {"uv": [5, 7.75, 5.75, 9], "texture": "#0"}, - "east": {"uv": [3, 8.5, 3.5, 9.75], "texture": "#0"}, - "south": {"uv": [8, 1, 8.75, 2.25], "texture": "#0"}, - "west": {"uv": [8.5, 5.75, 9, 7], "texture": "#0"}, - "up": {"uv": [4.25, 9.25, 3.5, 8.75], "texture": "#0"}, - "down": {"uv": [5, 8.75, 4.25, 9.25], "texture": "#0"} - } - }, - { - "from": [6, -3, 5], - "to": [11, -1, 8], - "rotation": {"angle": 0, "axis": "y", "origin": [7, 0, 6]}, - "faces": { - "north": {"uv": [8.5, 7, 9.75, 7.5], "texture": "#0"}, - "east": {"uv": [5, 9, 5.75, 9.5], "texture": "#0"}, - "south": {"uv": [8.5, 7.5, 9.75, 8], "texture": "#0"}, - "west": {"uv": [9, 5.75, 9.75, 6.25], "texture": "#0"}, - "up": {"uv": [9.25, 3, 8, 2.25], "texture": "#0"}, - "down": {"uv": [9.25, 3, 8, 3.75], "texture": "#0"} - } - }, - { - "from": [12, 0, 4], - "to": [17, 2, 8], - "rotation": {"angle": 0, "axis": "y", "origin": [7, 0, 6]}, - "faces": { - "north": {"uv": [8.5, 8, 9.75, 8.5], "texture": "#0"}, - "east": {"uv": [8.75, 0, 9.75, 0.5], "texture": "#0"}, - "south": {"uv": [8.5, 8.5, 9.75, 9], "texture": "#0"}, - "west": {"uv": [8.75, 0.5, 9.75, 1], "texture": "#0"}, - "up": {"uv": [3.75, 8.5, 2.5, 7.5], "texture": "#0"}, - "down": {"uv": [5, 7.75, 3.75, 8.75], "texture": "#0"} - } - }, - { - "from": [12, 2.5, -3], - "to": [16.5, 7, 24], - "rotation": {"angle": 22.5, "axis": "x", "origin": [7, 2, 6]}, - "faces": { - "north": {"uv": [6.75, 1, 8, 2.25], "texture": "#0"}, - "east": {"uv": [0, 0, 6.75, 1.25], "texture": "#0"}, - "south": {"uv": [7.25, 4.25, 8.5, 5.5], "texture": "#0"}, - "west": {"uv": [0, 1.25, 6.75, 2.5], "texture": "#0"}, - "up": {"uv": [1.25, 9.25, 0, 2.5], "texture": "#0"}, - "down": {"uv": [2.5, 2.5, 1.25, 9.25], "texture": "#0"} - } - }, - { - "from": [11, 1.5, -5], - "to": [17.5, 8, -3], - "rotation": {"angle": 22.5, "axis": "x", "origin": [7, 2, 6]}, - "faces": { - "north": {"uv": [4.5, 2.5, 6.25, 4.25], "texture": "#0"}, - "east": {"uv": [8, 7.25, 8.5, 9], "texture": "#0"}, - "south": {"uv": [4.5, 4.25, 6.25, 6], "texture": "#0"}, - "west": {"uv": [6.25, 8.25, 6.75, 10], "texture": "#0"}, - "up": {"uv": [9.75, 4.25, 8, 3.75], "texture": "#0"}, - "down": {"uv": [10.25, 4.25, 8.5, 4.75], "texture": "#0"} - } - }, - { - "from": [11, 1.5, 24], - "to": [17.5, 8, 26], - "rotation": {"angle": 22.5, "axis": "x", "origin": [7, 2, 6]}, - "faces": { - "north": {"uv": [4.5, 6, 6.25, 7.75], "texture": "#0"}, - "east": {"uv": [6.75, 8.25, 7.25, 10], "texture": "#0"}, - "south": {"uv": [6.25, 2.5, 8, 4.25], "texture": "#0"}, - "west": {"uv": [2.5, 8.5, 3, 10.25], "texture": "#0"}, - "up": {"uv": [10.25, 5.25, 8.5, 4.75], "texture": "#0"}, - "down": {"uv": [10.25, 5.25, 8.5, 5.75], "texture": "#0"} - } - } - ], - "display": { - "thirdperson_righthand": { - "translation": [-6, 8, 2.25], - "scale": [1.1, 1.1, 1.1] - }, - "ground": { - "translation": [0, 7.75, 0], - "scale": [0.7, 0.7, 0.7] - }, - "head": { - "translation": [4.25, 0, 0] - }, - "fixed": { - "rotation": [0, -90, 0], - "translation": [3.5, 5, -6.75] - } - } -} \ No newline at end of file