From 58c552bae4c97156aaafe18957f01ec2e474d358 Mon Sep 17 00:00:00 2001 From: 17146 <1714673995@qq.com> Date: Wed, 21 May 2025 18:07:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=84=E8=8C=83=E5=8C=96ak12?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../b69ee8a2655365569b979911c0440daa8c470ac2 | 5 +++- .../superbwarfare/models/item/ak_12.json | 28 ++++++++++++++++++ .../superbwarfare/models/item/ak_12_base.json | 6 ++++ .../superbwarfare/models/item/ak_12_icon.json | 6 ++++ .../client/model/item/AK12ItemModel.java | 6 ++-- .../datagen/ModItemModelProvider.java | 3 +- .../item/gun/rifle/AK12Item.java | 28 +++++++++--------- ...12.animation.json => ak_12.animation.json} | 24 +++++++-------- .../geo/{ak12.geo.json => ak_12.geo.json} | 2 +- .../{ak12.item.json => ak_12.item.json} | 0 .../superbwarfare/models/item/aa_12_icon.json | 6 ---- .../superbwarfare/models/item/ak_12.json | 27 ----------------- .../superbwarfare/models/item/ak_12_base.json | 6 ---- .../superbwarfare/models/item/ak_12_icon.json | 6 ---- .../{item/ak_123d.json => lod/ak_12.json} | 2 +- .../{ak12_icon.png => ak_12_icon.png} | Bin .../textures/item/{ak12.png => ak_12.png} | Bin .../item/{ak12_icon.png => ak_12_icon.png} | Bin .../item/{ak12_3d.png => lod/ak_12.png} | Bin 19 files changed, 77 insertions(+), 78 deletions(-) create mode 100644 src/generated/resources/assets/superbwarfare/models/item/ak_12.json create mode 100644 src/generated/resources/assets/superbwarfare/models/item/ak_12_base.json create mode 100644 src/generated/resources/assets/superbwarfare/models/item/ak_12_icon.json rename src/main/resources/assets/superbwarfare/animations/{ak12.animation.json => ak_12.animation.json} (99%) rename src/main/resources/assets/superbwarfare/geo/{ak12.geo.json => ak_12.geo.json} (99%) rename src/main/resources/assets/superbwarfare/models/displaysettings/{ak12.item.json => ak_12.item.json} (100%) delete mode 100644 src/main/resources/assets/superbwarfare/models/item/aa_12_icon.json delete mode 100644 src/main/resources/assets/superbwarfare/models/item/ak_12.json delete mode 100644 src/main/resources/assets/superbwarfare/models/item/ak_12_base.json delete mode 100644 src/main/resources/assets/superbwarfare/models/item/ak_12_icon.json rename src/main/resources/assets/superbwarfare/models/{item/ak_123d.json => lod/ak_12.json} (99%) rename src/main/resources/assets/superbwarfare/textures/gun_icon/{ak12_icon.png => ak_12_icon.png} (100%) rename src/main/resources/assets/superbwarfare/textures/item/{ak12.png => ak_12.png} (100%) rename src/main/resources/assets/superbwarfare/textures/item/{ak12_icon.png => ak_12_icon.png} (100%) rename src/main/resources/assets/superbwarfare/textures/item/{ak12_3d.png => lod/ak_12.png} (100%) diff --git a/src/generated/resources/.cache/b69ee8a2655365569b979911c0440daa8c470ac2 b/src/generated/resources/.cache/b69ee8a2655365569b979911c0440daa8c470ac2 index 9560a4eb3..e28d74803 100644 --- a/src/generated/resources/.cache/b69ee8a2655365569b979911c0440daa8c470ac2 +++ b/src/generated/resources/.cache/b69ee8a2655365569b979911c0440daa8c470ac2 @@ -1,11 +1,14 @@ -// 1.21.1 2025-05-21T21:19:03.1904953 Item Models: superbwarfare +// 1.21.1 2025-05-21T21:21:58.5575482 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 eee5935baee9a6a78e6576735736512f528eb4db assets/superbwarfare/models/item/aa_12_icon.json 0a9bfb695c2b5668863a2de4770f5bfca663c1dc assets/superbwarfare/models/item/agm.json 29ad5daadcdf7c10771fc45b649c527d16325cbb assets/superbwarfare/models/item/aircraft_catapult.json +669f3f22023bb6e2cc34b3b522235f5847afd8d1 assets/superbwarfare/models/item/ak_12.json +1016f92876debab22fdaa67312d2c2f0683195e1 assets/superbwarfare/models/item/ak_12_base.json 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/ak_12_blueprint.json +0843d7b6ebb6269746e030ddd49c17cc4715c77b assets/superbwarfare/models/item/ak_12_icon.json 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/ak_47_blueprint.json c993bddc0db9453ffbefa59f9ac9a74dba909038 assets/superbwarfare/models/item/ancient_cpu.json a5cf666a970906ba6ac0af9a4d5d52dd0e093dec assets/superbwarfare/models/item/annihilator_blueprint.json diff --git a/src/generated/resources/assets/superbwarfare/models/item/ak_12.json b/src/generated/resources/assets/superbwarfare/models/item/ak_12.json new file mode 100644 index 000000000..7809a3a37 --- /dev/null +++ b/src/generated/resources/assets/superbwarfare/models/item/ak_12.json @@ -0,0 +1,28 @@ +{ + "parent": "minecraft:item/generated", + "base": { + "parent": "superbwarfare:item/ak_12_base" + }, + "gui_light": "front", + "loader": "neoforge:separate_transforms", + "perspectives": { + "fixed": { + "parent": "superbwarfare:lod/ak_12" + }, + "ground": { + "parent": "superbwarfare:lod/ak_12" + }, + "gui": { + "parent": "superbwarfare:item/ak_12_icon" + }, + "head": { + "parent": "superbwarfare:lod/ak_12" + }, + "thirdperson_lefthand": { + "parent": "superbwarfare:lod/ak_12" + }, + "thirdperson_righthand": { + "parent": "superbwarfare:lod/ak_12" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/superbwarfare/models/item/ak_12_base.json b/src/generated/resources/assets/superbwarfare/models/item/ak_12_base.json new file mode 100644 index 000000000..bdefe4828 --- /dev/null +++ b/src/generated/resources/assets/superbwarfare/models/item/ak_12_base.json @@ -0,0 +1,6 @@ +{ + "parent": "superbwarfare:displaysettings/ak_12.item", + "textures": { + "layer0": "superbwarfare:item/ak_12" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/superbwarfare/models/item/ak_12_icon.json b/src/generated/resources/assets/superbwarfare/models/item/ak_12_icon.json new file mode 100644 index 000000000..f565c49b3 --- /dev/null +++ b/src/generated/resources/assets/superbwarfare/models/item/ak_12_icon.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "superbwarfare:item/ak_12_icon" + } +} \ No newline at end of file diff --git a/src/main/java/com/atsuishio/superbwarfare/client/model/item/AK12ItemModel.java b/src/main/java/com/atsuishio/superbwarfare/client/model/item/AK12ItemModel.java index 786cedca1..0b3ee2443 100644 --- a/src/main/java/com/atsuishio/superbwarfare/client/model/item/AK12ItemModel.java +++ b/src/main/java/com/atsuishio/superbwarfare/client/model/item/AK12ItemModel.java @@ -27,17 +27,17 @@ public class AK12ItemModel extends GeoModel { @Override public ResourceLocation getAnimationResource(AK12Item animatable) { - return Mod.loc("animations/ak12.animation.json"); + return Mod.loc("animations/ak_12.animation.json"); } @Override public ResourceLocation getModelResource(AK12Item animatable) { - return Mod.loc("geo/ak12.geo.json"); + return Mod.loc("geo/ak_12.geo.json"); } @Override public ResourceLocation getTextureResource(AK12Item animatable) { - return Mod.loc("textures/item/ak12.png"); + return Mod.loc("textures/item/ak_12.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 3dab4e34f..e5465d95e 100644 --- a/src/main/java/com/atsuishio/superbwarfare/datagen/ModItemModelProvider.java +++ b/src/main/java/com/atsuishio/superbwarfare/datagen/ModItemModelProvider.java @@ -28,6 +28,7 @@ public class ModItemModelProvider extends ItemModelProvider { protected void registerModels() { // gun gunItem(ModItems.AA_12); + gunItem(ModItems.AK_12); gunItem(ModItems.AURELIA_SCEPTRE); simpleItem(ModItems.EMPTY_PERK, "perk/"); @@ -242,7 +243,7 @@ public class ModItemModelProvider extends ItemModelProvider { .end(); } - private void gunItem(DeferredHolder item) { + public void gunItem(DeferredHolder item) { this.gunIcon(item); this.gunBase(item); this.customSeparatedGunModel(item); diff --git a/src/main/java/com/atsuishio/superbwarfare/item/gun/rifle/AK12Item.java b/src/main/java/com/atsuishio/superbwarfare/item/gun/rifle/AK12Item.java index 120dcda8c..9e9ef4439 100644 --- a/src/main/java/com/atsuishio/superbwarfare/item/gun/rifle/AK12Item.java +++ b/src/main/java/com/atsuishio/superbwarfare/item/gun/rifle/AK12Item.java @@ -62,44 +62,44 @@ public class AK12Item extends GunItem implements GeoItem { if (GunData.from(stack).reload.empty()) { if (grip) { - return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak12.reload_empty_grip")); + return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak_12.reload_empty_grip")); } else { - return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak12.reload_empty")); + return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak_12.reload_empty")); } } if (GunData.from(stack).reload.normal()) { if (drum) { if (grip) { - return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak12.reload_normal_drum_grip")); + return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak_12.reload_normal_drum_grip")); } else { - return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak12.reload_normal_drum")); + return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak_12.reload_normal_drum")); } } else { if (grip) { - return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak12.reload_normal_grip")); + return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak_12.reload_normal_grip")); } else { - return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak12.reload_normal")); + return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak_12.reload_normal")); } } } if (player.isSprinting() && player.onGround() && ClientEventHandler.cantSprint == 0 && ClientEventHandler.drawTime < 0.01) { if (ClientEventHandler.tacticalSprint) { - return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak12.run_fast")); + return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak_12.run_fast")); } else { if (grip) { - return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak12.run_grip")); + return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak_12.run_grip")); } else { - return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak12.run")); + return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak_12.run")); } } } if (grip) { - return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak12.idle_grip")); + return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak_12.idle_grip")); } else { - return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak12.idle")); + return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak_12.idle")); } } @@ -110,10 +110,10 @@ public class AK12Item extends GunItem implements GeoItem { if (!(stack.getItem() instanceof GunItem)) return PlayState.STOP; if (ClickHandler.isEditing) { - return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak12.edit")); + return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak_12.edit")); } - return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak12.idle")); + return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak_12.idle")); } @Override @@ -156,7 +156,7 @@ public class AK12Item extends GunItem implements GeoItem { @Override public ResourceLocation getGunIcon() { - return Mod.loc("textures/gun_icon/ak12_icon.png"); + return Mod.loc("textures/gun_icon/ak_12_icon.png"); } @Override diff --git a/src/main/resources/assets/superbwarfare/animations/ak12.animation.json b/src/main/resources/assets/superbwarfare/animations/ak_12.animation.json similarity index 99% rename from src/main/resources/assets/superbwarfare/animations/ak12.animation.json rename to src/main/resources/assets/superbwarfare/animations/ak_12.animation.json index 955f2990e..f2c240c1e 100644 --- a/src/main/resources/assets/superbwarfare/animations/ak12.animation.json +++ b/src/main/resources/assets/superbwarfare/animations/ak_12.animation.json @@ -1,10 +1,10 @@ { "format_version": "1.8.0", "animations": { - "animation.ak12.idle": { + "animation.ak_12.idle": { "animation_length": 1 }, - "animation.ak12.edit": { + "animation.ak_12.edit": { "loop": "hold_on_last_frame", "animation_length": 0.4083, "bones": { @@ -38,7 +38,7 @@ } } }, - "animation.ak12.run": { + "animation.ak_12.run": { "loop": true, "animation_length": 0.8, "bones": { @@ -69,7 +69,7 @@ } } }, - "animation.ak12.run_fast": { + "animation.ak_12.run_fast": { "loop": true, "animation_length": 0.7, "bones": { @@ -104,7 +104,7 @@ } } }, - "animation.ak12.reload_normal": { + "animation.ak_12.reload_normal": { "loop": "hold_on_last_frame", "animation_length": 2.6833, "override_previous_animation": true, @@ -542,7 +542,7 @@ } } }, - "animation.ak12.reload_normal_drum": { + "animation.ak_12.reload_normal_drum": { "loop": "hold_on_last_frame", "animation_length": 2.6833, "override_previous_animation": true, @@ -980,7 +980,7 @@ } } }, - "animation.ak12.reload_empty": { + "animation.ak_12.reload_empty": { "loop": "hold_on_last_frame", "animation_length": 2.9, "override_previous_animation": true, @@ -1325,7 +1325,7 @@ } } }, - "animation.ak12.idle_grip": { + "animation.ak_12.idle_grip": { "animation_length": 1, "bones": { "Lefthand": { @@ -1334,7 +1334,7 @@ } } }, - "animation.ak12.run_grip": { + "animation.ak_12.run_grip": { "loop": true, "animation_length": 0.8, "bones": { @@ -1369,7 +1369,7 @@ } } }, - "animation.ak12.reload_normal_grip": { + "animation.ak_12.reload_normal_grip": { "loop": "hold_on_last_frame", "animation_length": 2.75, "override_previous_animation": true, @@ -1807,7 +1807,7 @@ } } }, - "animation.ak12.reload_normal_drum_grip": { + "animation.ak_12.reload_normal_drum_grip": { "loop": "hold_on_last_frame", "animation_length": 2.6833, "override_previous_animation": true, @@ -2245,7 +2245,7 @@ } } }, - "animation.ak12.reload_empty_grip": { + "animation.ak_12.reload_empty_grip": { "loop": "hold_on_last_frame", "animation_length": 2.9, "override_previous_animation": true, diff --git a/src/main/resources/assets/superbwarfare/geo/ak12.geo.json b/src/main/resources/assets/superbwarfare/geo/ak_12.geo.json similarity index 99% rename from src/main/resources/assets/superbwarfare/geo/ak12.geo.json rename to src/main/resources/assets/superbwarfare/geo/ak_12.geo.json index a814136b9..e88e48caf 100644 --- a/src/main/resources/assets/superbwarfare/geo/ak12.geo.json +++ b/src/main/resources/assets/superbwarfare/geo/ak_12.geo.json @@ -3,7 +3,7 @@ "minecraft:geometry": [ { "description": { - "identifier": "geometry.ak12", + "identifier": "geometry.ak_12", "texture_width": 128, "texture_height": 128, "visible_bounds_width": 29, diff --git a/src/main/resources/assets/superbwarfare/models/displaysettings/ak12.item.json b/src/main/resources/assets/superbwarfare/models/displaysettings/ak_12.item.json similarity index 100% rename from src/main/resources/assets/superbwarfare/models/displaysettings/ak12.item.json rename to src/main/resources/assets/superbwarfare/models/displaysettings/ak_12.item.json diff --git a/src/main/resources/assets/superbwarfare/models/item/aa_12_icon.json b/src/main/resources/assets/superbwarfare/models/item/aa_12_icon.json deleted file mode 100644 index 550cf9d18..000000000 --- a/src/main/resources/assets/superbwarfare/models/item/aa_12_icon.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "superbwarfare:item/aa_12" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/superbwarfare/models/item/ak_12.json b/src/main/resources/assets/superbwarfare/models/item/ak_12.json deleted file mode 100644 index c1a1c26df..000000000 --- a/src/main/resources/assets/superbwarfare/models/item/ak_12.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "loader": "neoforge:separate_transforms", - "gui_light": "front", - "base": { - "parent": "superbwarfare:item/ak_12_base" - }, - "perspectives": { - "gui": { - "parent": "superbwarfare:item/ak_12_icon" - }, - "thirdperson_righthand": { - "parent": "superbwarfare:item/ak_123d" - }, - "thirdperson_lefthand": { - "parent": "superbwarfare:item/ak_123d" - }, - "ground": { - "parent": "superbwarfare:item/ak_123d" - }, - "fixed": { - "parent": "superbwarfare:item/ak_123d" - }, - "head": { - "parent": "superbwarfare:item/ak_123d" - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/superbwarfare/models/item/ak_12_base.json b/src/main/resources/assets/superbwarfare/models/item/ak_12_base.json deleted file mode 100644 index 432a3f7d6..000000000 --- a/src/main/resources/assets/superbwarfare/models/item/ak_12_base.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "superbwarfare:displaysettings/ak12.item", - "textures": { - "layer0": "superbwarfare:item/ak12" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/superbwarfare/models/item/ak_12_icon.json b/src/main/resources/assets/superbwarfare/models/item/ak_12_icon.json deleted file mode 100644 index 02f28f2a1..000000000 --- a/src/main/resources/assets/superbwarfare/models/item/ak_12_icon.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "superbwarfare:item/ak12_icon" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/superbwarfare/models/item/ak_123d.json b/src/main/resources/assets/superbwarfare/models/lod/ak_12.json similarity index 99% rename from src/main/resources/assets/superbwarfare/models/item/ak_123d.json rename to src/main/resources/assets/superbwarfare/models/lod/ak_12.json index d554f046a..e5debdd4c 100644 --- a/src/main/resources/assets/superbwarfare/models/item/ak_123d.json +++ b/src/main/resources/assets/superbwarfare/models/lod/ak_12.json @@ -2,7 +2,7 @@ "credit": "Made with Blockbench", "texture_size": [32, 32], "textures": { - "1": "superbwarfare:item/ak12_3d" + "1": "superbwarfare:item/lod/ak_12" }, "elements": [ { diff --git a/src/main/resources/assets/superbwarfare/textures/gun_icon/ak12_icon.png b/src/main/resources/assets/superbwarfare/textures/gun_icon/ak_12_icon.png similarity index 100% rename from src/main/resources/assets/superbwarfare/textures/gun_icon/ak12_icon.png rename to src/main/resources/assets/superbwarfare/textures/gun_icon/ak_12_icon.png diff --git a/src/main/resources/assets/superbwarfare/textures/item/ak12.png b/src/main/resources/assets/superbwarfare/textures/item/ak_12.png similarity index 100% rename from src/main/resources/assets/superbwarfare/textures/item/ak12.png rename to src/main/resources/assets/superbwarfare/textures/item/ak_12.png diff --git a/src/main/resources/assets/superbwarfare/textures/item/ak12_icon.png b/src/main/resources/assets/superbwarfare/textures/item/ak_12_icon.png similarity index 100% rename from src/main/resources/assets/superbwarfare/textures/item/ak12_icon.png rename to src/main/resources/assets/superbwarfare/textures/item/ak_12_icon.png diff --git a/src/main/resources/assets/superbwarfare/textures/item/ak12_3d.png b/src/main/resources/assets/superbwarfare/textures/item/lod/ak_12.png similarity index 100% rename from src/main/resources/assets/superbwarfare/textures/item/ak12_3d.png rename to src/main/resources/assets/superbwarfare/textures/item/lod/ak_12.png