From bf29c8d1dd7dcd33b62f9bc1a435eae998c96f0e Mon Sep 17 00:00:00 2001 From: 17146 <1714673995@qq.com> Date: Thu, 22 May 2025 00:15:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=84=E8=8C=83=E5=8C=96mp443?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../b69ee8a2655365569b979911c0440daa8c470ac2 | 5 +- .../superbwarfare/models/item/mp_443.json | 28 +++++ .../models/item/mp_443_base.json | 6 + .../models/item/mp_443_icon.json | 6 + .../client/model/item/Mp443ItemModel.java | 4 +- .../datagen/ModItemModelProvider.java | 1 + .../item/gun/handgun/Mp443Item.java | 14 +-- .../geo/{mp443.geo.json => mp_443.geo.json} | 2 +- .../models/displaysettings/mp_443.item.json | 107 ++++++++++++++++++ .../superbwarfare/models/item/mp443_icon.json | 6 - .../superbwarfare/models/item/mp_443.json | 27 ----- .../{item/mp443_3d.json => lod/mp_443.json} | 4 +- .../{mp443_icon.png => mp_443_icon.png} | Bin .../item/{mp443_3d.png => lod/mp_443.png} | Bin .../textures/item/{mp443.png => mp_443.png} | Bin .../item/{mp443_icon.png => mp_443_icon.png} | Bin 16 files changed, 164 insertions(+), 46 deletions(-) create mode 100644 src/generated/resources/assets/superbwarfare/models/item/mp_443.json create mode 100644 src/generated/resources/assets/superbwarfare/models/item/mp_443_base.json create mode 100644 src/generated/resources/assets/superbwarfare/models/item/mp_443_icon.json rename src/main/resources/assets/superbwarfare/geo/{mp443.geo.json => mp_443.geo.json} (99%) create mode 100644 src/main/resources/assets/superbwarfare/models/displaysettings/mp_443.item.json delete mode 100644 src/main/resources/assets/superbwarfare/models/item/mp443_icon.json delete mode 100644 src/main/resources/assets/superbwarfare/models/item/mp_443.json rename src/main/resources/assets/superbwarfare/models/{item/mp443_3d.json => lod/mp_443.json} (98%) rename src/main/resources/assets/superbwarfare/textures/gun_icon/{mp443_icon.png => mp_443_icon.png} (100%) rename src/main/resources/assets/superbwarfare/textures/item/{mp443_3d.png => lod/mp_443.png} (100%) rename src/main/resources/assets/superbwarfare/textures/item/{mp443.png => mp_443.png} (100%) rename src/main/resources/assets/superbwarfare/textures/item/{mp443_icon.png => mp_443_icon.png} (100%) diff --git a/src/generated/resources/.cache/b69ee8a2655365569b979911c0440daa8c470ac2 b/src/generated/resources/.cache/b69ee8a2655365569b979911c0440daa8c470ac2 index a20ad9f62..09df417c0 100644 --- a/src/generated/resources/.cache/b69ee8a2655365569b979911c0440daa8c470ac2 +++ b/src/generated/resources/.cache/b69ee8a2655365569b979911c0440daa8c470ac2 @@ -1,4 +1,4 @@ -// 1.21.1 2025-05-22T00:12:54.9420818 Item Models: superbwarfare +// 1.21.1 2025-05-22T00:21:20.5670033 Item Models: superbwarfare 6c48f5010e7e2b8cd4d3ff85c8de45cf56f53268 assets/superbwarfare/models/item/aa_12.json fb3a995587b2c253571c3160ff02c2ad8c73ecf8 assets/superbwarfare/models/item/aa_12_base.json 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/aa_12_blueprint.json @@ -132,7 +132,10 @@ ac9c6bc308bd741ada7f19d808d0c0722fceb976 assets/superbwarfare/models/item/mortar 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/mosin_nagant_blueprint.json 264482666ae2b2be05f1ab7dbc0cf7b3360cf183 assets/superbwarfare/models/item/mosin_nagant_icon.json 4de8d6e0cddd28963febd35e9b66334a41a25d4c assets/superbwarfare/models/item/motor.json +07eea739621349ed91ae297ed32de70d8d904e46 assets/superbwarfare/models/item/mp_443.json +e99d2028715786071c4c397a83337e00e6af2409 assets/superbwarfare/models/item/mp_443_base.json 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/mp_443_blueprint.json +ea51ca13b0d1d2c2f265825f397a893e46e95787 assets/superbwarfare/models/item/mp_443_icon.json 9f523f08520ee193ca626e46602baddf46d2acc3 assets/superbwarfare/models/item/m_1911.json 9564d9a7a4a4f05dd6840e166d601d7fc50a29ce assets/superbwarfare/models/item/m_1911_base.json 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/m_1911_blueprint.json diff --git a/src/generated/resources/assets/superbwarfare/models/item/mp_443.json b/src/generated/resources/assets/superbwarfare/models/item/mp_443.json new file mode 100644 index 000000000..c5c9ba269 --- /dev/null +++ b/src/generated/resources/assets/superbwarfare/models/item/mp_443.json @@ -0,0 +1,28 @@ +{ + "parent": "minecraft:item/generated", + "base": { + "parent": "superbwarfare:item/mp_443_base" + }, + "gui_light": "front", + "loader": "neoforge:separate_transforms", + "perspectives": { + "fixed": { + "parent": "superbwarfare:lod/mp_443" + }, + "ground": { + "parent": "superbwarfare:lod/mp_443" + }, + "gui": { + "parent": "superbwarfare:item/mp_443_icon" + }, + "head": { + "parent": "superbwarfare:lod/mp_443" + }, + "thirdperson_lefthand": { + "parent": "superbwarfare:lod/mp_443" + }, + "thirdperson_righthand": { + "parent": "superbwarfare:lod/mp_443" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/superbwarfare/models/item/mp_443_base.json b/src/generated/resources/assets/superbwarfare/models/item/mp_443_base.json new file mode 100644 index 000000000..c7611e061 --- /dev/null +++ b/src/generated/resources/assets/superbwarfare/models/item/mp_443_base.json @@ -0,0 +1,6 @@ +{ + "parent": "superbwarfare:displaysettings/mp_443.item", + "textures": { + "layer0": "superbwarfare:item/mp_443" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/superbwarfare/models/item/mp_443_icon.json b/src/generated/resources/assets/superbwarfare/models/item/mp_443_icon.json new file mode 100644 index 000000000..f88932eab --- /dev/null +++ b/src/generated/resources/assets/superbwarfare/models/item/mp_443_icon.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "superbwarfare:item/mp_443_icon" + } +} \ No newline at end of file diff --git a/src/main/java/com/atsuishio/superbwarfare/client/model/item/Mp443ItemModel.java b/src/main/java/com/atsuishio/superbwarfare/client/model/item/Mp443ItemModel.java index 574b54701..7d0f68d38 100644 --- a/src/main/java/com/atsuishio/superbwarfare/client/model/item/Mp443ItemModel.java +++ b/src/main/java/com/atsuishio/superbwarfare/client/model/item/Mp443ItemModel.java @@ -28,12 +28,12 @@ public class Mp443ItemModel extends GeoModel { @Override public ResourceLocation getModelResource(Mp443Item animatable) { - return Mod.loc("geo/mp443.geo.json"); + return Mod.loc("geo/mp_443.geo.json"); } @Override public ResourceLocation getTextureResource(Mp443Item animatable) { - return Mod.loc("textures/item/mp443.png"); + return Mod.loc("textures/item/mp_443.png"); } @Override diff --git a/src/main/java/com/atsuishio/superbwarfare/datagen/ModItemModelProvider.java b/src/main/java/com/atsuishio/superbwarfare/datagen/ModItemModelProvider.java index ff893ab64..6ca29b0f9 100644 --- a/src/main/java/com/atsuishio/superbwarfare/datagen/ModItemModelProvider.java +++ b/src/main/java/com/atsuishio/superbwarfare/datagen/ModItemModelProvider.java @@ -51,6 +51,7 @@ public class ModItemModelProvider extends ItemModelProvider { gunItem(ModItems.MINIGUN); gunItem(ModItems.MK_14); gunItem(ModItems.MOSIN_NAGANT); + gunItem(ModItems.MP_443); simpleItem(ModItems.EMPTY_PERK, "perk/"); diff --git a/src/main/java/com/atsuishio/superbwarfare/item/gun/handgun/Mp443Item.java b/src/main/java/com/atsuishio/superbwarfare/item/gun/handgun/Mp443Item.java index 177a732a7..10c4b6a6c 100644 --- a/src/main/java/com/atsuishio/superbwarfare/item/gun/handgun/Mp443Item.java +++ b/src/main/java/com/atsuishio/superbwarfare/item/gun/handgun/Mp443Item.java @@ -44,14 +44,14 @@ public class Mp443Item extends GunItem implements GeoItem { if (!(stack.getItem() instanceof GunItem)) return PlayState.STOP; if (GunData.from(stack).reload.empty()) { - return event.setAndContinue(RawAnimation.begin().thenPlay("animation.glock.reload_empty")); + return event.setAndContinue(RawAnimation.begin().thenPlay("animation.glock17.reload_empty")); } if (GunData.from(stack).reload.normal()) { - return event.setAndContinue(RawAnimation.begin().thenPlay("animation.glock.reload_normal")); + return event.setAndContinue(RawAnimation.begin().thenPlay("animation.glock17.reload_normal")); } - return event.setAndContinue(RawAnimation.begin().thenLoop("animation.glock.idle")); + return event.setAndContinue(RawAnimation.begin().thenLoop("animation.glock17.idle")); } private PlayState idlePredicate(AnimationState event) { @@ -64,13 +64,13 @@ public class Mp443Item extends GunItem implements GeoItem { && ClientEventHandler.cantSprint == 0 && !(GunData.from(stack).reload.normal() || GunData.from(stack).reload.empty()) && ClientEventHandler.drawTime < 0.01) { if (ClientEventHandler.tacticalSprint) { - return event.setAndContinue(RawAnimation.begin().thenLoop("animation.glock.run_fast")); + return event.setAndContinue(RawAnimation.begin().thenLoop("animation.glock17.run_fast")); } else { - return event.setAndContinue(RawAnimation.begin().thenLoop("animation.glock.run")); + return event.setAndContinue(RawAnimation.begin().thenLoop("animation.glock17.run")); } } - return event.setAndContinue(RawAnimation.begin().thenLoop("animation.glock.idle")); + return event.setAndContinue(RawAnimation.begin().thenLoop("animation.glock17.idle")); } @Override @@ -93,7 +93,7 @@ public class Mp443Item extends GunItem implements GeoItem { @Override public ResourceLocation getGunIcon() { - return Mod.loc("textures/gun_icon/mp443_icon.png"); + return Mod.loc("textures/gun_icon/mp_443_icon.png"); } @Override diff --git a/src/main/resources/assets/superbwarfare/geo/mp443.geo.json b/src/main/resources/assets/superbwarfare/geo/mp_443.geo.json similarity index 99% rename from src/main/resources/assets/superbwarfare/geo/mp443.geo.json rename to src/main/resources/assets/superbwarfare/geo/mp_443.geo.json index 8b0590ba0..c69706136 100644 --- a/src/main/resources/assets/superbwarfare/geo/mp443.geo.json +++ b/src/main/resources/assets/superbwarfare/geo/mp_443.geo.json @@ -3,7 +3,7 @@ "minecraft:geometry": [ { "description": { - "identifier": "geometry.unknown", + "identifier": "geometry.mp_443", "texture_width": 64, "texture_height": 64, "visible_bounds_width": 4, diff --git a/src/main/resources/assets/superbwarfare/models/displaysettings/mp_443.item.json b/src/main/resources/assets/superbwarfare/models/displaysettings/mp_443.item.json new file mode 100644 index 000000000..4ae83a3e3 --- /dev/null +++ b/src/main/resources/assets/superbwarfare/models/displaysettings/mp_443.item.json @@ -0,0 +1,107 @@ +{ + "credit": "Made with Blockbench", + "parent": "builtin/entity", + "texture_size": [ + 64, + 64 + ], + "gui_light": "front", + "display": { + "thirdperson_righthand": { + "translation": [ + 0, + 0, + -0.5 + ], + "scale": [ + 0.35, + 0.35, + 0.35 + ] + }, + "thirdperson_lefthand": { + "translation": [ + 0, + 0, + -0.5 + ], + "scale": [ + 0.35, + 0.35, + 0.35 + ] + }, + "firstperson_righthand": { + "translation": [ + -7.75, + 3.5, + -1.5 + ] + }, + "firstperson_lefthand": { + "translation": [ + 80, + -80, + 80 + ], + "scale": [ + 0, + 0, + 0 + ] + }, + "ground": { + "translation": [ + 0, + 5, + 0 + ], + "scale": [ + 0.35, + 0.35, + 0.35 + ] + }, + "gui": { + "rotation": [ + 165.69, + -39.63, + 167 + ], + "translation": [ + -0.25, + 0, + 0 + ], + "scale": [ + 1.7, + 1.7, + 1.7 + ] + }, + "head": { + "translation": [ + 0, + 10.25, + -1.25 + ] + }, + "fixed": { + "rotation": [ + 0, + 90, + 0 + ], + "translation": [ + -1, + -0.5, + -1 + ], + "scale": [ + 0.7, + 0.7, + 0.7 + ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/superbwarfare/models/item/mp443_icon.json b/src/main/resources/assets/superbwarfare/models/item/mp443_icon.json deleted file mode 100644 index 394713f14..000000000 --- a/src/main/resources/assets/superbwarfare/models/item/mp443_icon.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "superbwarfare:item/mp443_icon" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/superbwarfare/models/item/mp_443.json b/src/main/resources/assets/superbwarfare/models/item/mp_443.json deleted file mode 100644 index f157aeced..000000000 --- a/src/main/resources/assets/superbwarfare/models/item/mp_443.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "loader": "neoforge:separate_transforms", - "gui_light": "front", - "base": { - "parent": "superbwarfare:item/glock_17_base" - }, - "perspectives": { - "gui": { - "parent": "superbwarfare:item/mp443_icon" - }, - "thirdperson_righthand": { - "parent": "superbwarfare:item/mp443_3d" - }, - "thirdperson_lefthand": { - "parent": "superbwarfare:item/mp443_3d" - }, - "ground": { - "parent": "superbwarfare:item/mp443_3d" - }, - "fixed": { - "parent": "superbwarfare:item/mp443_3d" - }, - "head": { - "parent": "superbwarfare:item/mp443_3d" - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/superbwarfare/models/item/mp443_3d.json b/src/main/resources/assets/superbwarfare/models/lod/mp_443.json similarity index 98% rename from src/main/resources/assets/superbwarfare/models/item/mp443_3d.json rename to src/main/resources/assets/superbwarfare/models/lod/mp_443.json index 09361f79e..4afe0866b 100644 --- a/src/main/resources/assets/superbwarfare/models/item/mp443_3d.json +++ b/src/main/resources/assets/superbwarfare/models/lod/mp_443.json @@ -2,8 +2,8 @@ "credit": "Made with Blockbench", "texture_size": [32, 32], "textures": { - "0": "superbwarfare:item/mp443_3d", - "particle": "superbwarfare:item/mp443_3d" + "0": "superbwarfare:item/lod/mp_443", + "particle": "superbwarfare:item/lod/mp_443" }, "elements": [ { diff --git a/src/main/resources/assets/superbwarfare/textures/gun_icon/mp443_icon.png b/src/main/resources/assets/superbwarfare/textures/gun_icon/mp_443_icon.png similarity index 100% rename from src/main/resources/assets/superbwarfare/textures/gun_icon/mp443_icon.png rename to src/main/resources/assets/superbwarfare/textures/gun_icon/mp_443_icon.png diff --git a/src/main/resources/assets/superbwarfare/textures/item/mp443_3d.png b/src/main/resources/assets/superbwarfare/textures/item/lod/mp_443.png similarity index 100% rename from src/main/resources/assets/superbwarfare/textures/item/mp443_3d.png rename to src/main/resources/assets/superbwarfare/textures/item/lod/mp_443.png diff --git a/src/main/resources/assets/superbwarfare/textures/item/mp443.png b/src/main/resources/assets/superbwarfare/textures/item/mp_443.png similarity index 100% rename from src/main/resources/assets/superbwarfare/textures/item/mp443.png rename to src/main/resources/assets/superbwarfare/textures/item/mp_443.png diff --git a/src/main/resources/assets/superbwarfare/textures/item/mp443_icon.png b/src/main/resources/assets/superbwarfare/textures/item/mp_443_icon.png similarity index 100% rename from src/main/resources/assets/superbwarfare/textures/item/mp443_icon.png rename to src/main/resources/assets/superbwarfare/textures/item/mp_443_icon.png