规范化m4

This commit is contained in:
17146 2025-05-21 21:13:05 +08:00 committed by Light_Quanta
parent 5530cf77e1
commit 33e76634c7
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959
20 changed files with 97 additions and 92 deletions

View file

@ -1,4 +1,4 @@
// 1.21.1 2025-05-21T21:43:37.7471932 Item Models: superbwarfare // 1.21.1 2025-05-21T21:47:41.4221104 Item Models: superbwarfare
6c48f5010e7e2b8cd4d3ff85c8de45cf56f53268 assets/superbwarfare/models/item/aa_12.json 6c48f5010e7e2b8cd4d3ff85c8de45cf56f53268 assets/superbwarfare/models/item/aa_12.json
fb3a995587b2c253571c3160ff02c2ad8c73ecf8 assets/superbwarfare/models/item/aa_12_base.json fb3a995587b2c253571c3160ff02c2ad8c73ecf8 assets/superbwarfare/models/item/aa_12_base.json
13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/aa_12_blueprint.json 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/aa_12_blueprint.json
@ -122,7 +122,10 @@ ac9c6bc308bd741ada7f19d808d0c0722fceb976 assets/superbwarfare/models/item/mortar
4de8d6e0cddd28963febd35e9b66334a41a25d4c assets/superbwarfare/models/item/motor.json 4de8d6e0cddd28963febd35e9b66334a41a25d4c assets/superbwarfare/models/item/motor.json
13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/mp_443_blueprint.json 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/mp_443_blueprint.json
13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/m_1911_blueprint.json 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/m_1911_blueprint.json
6e140a5076d9eb4787c0ea14ef3dedc87825dde6 assets/superbwarfare/models/item/m_4.json
516a430e688e26c4f02bded1113b7bd8c133dcef assets/superbwarfare/models/item/m_4_base.json
13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/m_4_blueprint.json 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/m_4_blueprint.json
04cc16bbdd7971e57940e901ad018e5cf5679c9a assets/superbwarfare/models/item/m_4_icon.json
13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/m_60_blueprint.json 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/m_60_blueprint.json
13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/m_79_blueprint.json 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/m_79_blueprint.json
13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/m_870_blueprint.json 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/m_870_blueprint.json

View file

@ -0,0 +1,28 @@
{
"parent": "minecraft:item/generated",
"base": {
"parent": "superbwarfare:item/m_4_base"
},
"gui_light": "front",
"loader": "neoforge:separate_transforms",
"perspectives": {
"fixed": {
"parent": "superbwarfare:lod/m_4"
},
"ground": {
"parent": "superbwarfare:lod/m_4"
},
"gui": {
"parent": "superbwarfare:item/m_4_icon"
},
"head": {
"parent": "superbwarfare:lod/m_4"
},
"thirdperson_lefthand": {
"parent": "superbwarfare:lod/m_4"
},
"thirdperson_righthand": {
"parent": "superbwarfare:lod/m_4"
}
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "superbwarfare:displaysettings/m_4.item",
"textures": {
"layer0": "superbwarfare:item/m_4"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "superbwarfare:item/m_4_icon"
}
}

View file

@ -28,7 +28,7 @@ public class Hk416ItemModel extends GeoModel<Hk416Item> {
@Override @Override
public ResourceLocation getAnimationResource(Hk416Item animatable) { public ResourceLocation getAnimationResource(Hk416Item animatable) {
return Mod.loc("animations/m4.animation.json"); return Mod.loc("animations/m_4.animation.json");
} }
@Override @Override

View file

@ -32,17 +32,17 @@ public class M4ItemModel extends GeoModel<M4Item> {
@Override @Override
public ResourceLocation getAnimationResource(M4Item animatable) { public ResourceLocation getAnimationResource(M4Item animatable) {
return Mod.loc("animations/m4.animation.json"); return Mod.loc("animations/m_4.animation.json");
} }
@Override @Override
public ResourceLocation getModelResource(M4Item animatable) { public ResourceLocation getModelResource(M4Item animatable) {
return Mod.loc("geo/m4.geo.json"); return Mod.loc("geo/m_4.geo.json");
} }
@Override @Override
public ResourceLocation getTextureResource(M4Item animatable) { public ResourceLocation getTextureResource(M4Item animatable) {
return Mod.loc("textures/item/m4.png"); return Mod.loc("textures/item/m_4.png");
} }
@Override @Override

View file

@ -41,6 +41,7 @@ public class ModItemModelProvider extends ItemModelProvider {
gunItem(ModItems.INSIDIOUS); gunItem(ModItems.INSIDIOUS);
gunItem(ModItems.JAVELIN); gunItem(ModItems.JAVELIN);
gunItem(ModItems.K_98); gunItem(ModItems.K_98);
gunItem(ModItems.M_4);
simpleItem(ModItems.EMPTY_PERK, "perk/"); simpleItem(ModItems.EMPTY_PERK, "perk/");

View file

@ -52,15 +52,15 @@ public class Hk416Item extends GunItem implements GeoItem {
if (GunData.from(stack).reload.empty()) { if (GunData.from(stack).reload.empty()) {
if (drum) { if (drum) {
if (grip) { if (grip) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m4.reload_empty_drum_grip")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m_4.reload_empty_drum_grip"));
} else { } else {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m4.reload_empty_drum")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m_4.reload_empty_drum"));
} }
} else { } else {
if (grip) { if (grip) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m4.reload_empty_grip")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m_4.reload_empty_grip"));
} else { } else {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m4.reload_empty")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m_4.reload_empty"));
} }
} }
} }
@ -68,35 +68,35 @@ public class Hk416Item extends GunItem implements GeoItem {
if (GunData.from(stack).reload.normal()) { if (GunData.from(stack).reload.normal()) {
if (drum) { if (drum) {
if (grip) { if (grip) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m4.reload_normal_drum_grip")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m_4.reload_normal_drum_grip"));
} else { } else {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m4.reload_normal_drum")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m_4.reload_normal_drum"));
} }
} else { } else {
if (grip) { if (grip) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m4.reload_normal_grip")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m_4.reload_normal_grip"));
} else { } else {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m4.reload_normal")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m_4.reload_normal"));
} }
} }
} }
if (player.isSprinting() && player.onGround() && ClientEventHandler.cantSprint == 0 && ClientEventHandler.drawTime < 0.01) { if (player.isSprinting() && player.onGround() && ClientEventHandler.cantSprint == 0 && ClientEventHandler.drawTime < 0.01) {
if (ClientEventHandler.tacticalSprint) { if (ClientEventHandler.tacticalSprint) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m4.run_fast")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m_4.run_fast"));
} else { } else {
if (grip) { if (grip) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m4.run_grip")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m_4.run_grip"));
} else { } else {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m4.run")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m_4.run"));
} }
} }
} }
if (grip) { if (grip) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m4.idle_grip")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m_4.idle_grip"));
} else { } else {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m4.idle")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m_4.idle"));
} }
} }
@ -107,10 +107,10 @@ public class Hk416Item extends GunItem implements GeoItem {
if (!(stack.getItem() instanceof GunItem)) return PlayState.STOP; if (!(stack.getItem() instanceof GunItem)) return PlayState.STOP;
if (ClickHandler.isEditing) { if (ClickHandler.isEditing) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m4.edit")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m_4.edit"));
} }
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m4.idle")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m_4.idle"));
} }
@Override @Override

View file

@ -53,15 +53,15 @@ public class M4Item extends GunItem implements GeoItem {
if (data.reload.empty()) { if (data.reload.empty()) {
if (drum) { if (drum) {
if (grip) { if (grip) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m4.reload_empty_drum_grip")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m_4.reload_empty_drum_grip"));
} else { } else {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m4.reload_empty_drum")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m_4.reload_empty_drum"));
} }
} else { } else {
if (grip) { if (grip) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m4.reload_empty_grip")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m_4.reload_empty_grip"));
} else { } else {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m4.reload_empty")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m_4.reload_empty"));
} }
} }
} }
@ -69,35 +69,35 @@ public class M4Item extends GunItem implements GeoItem {
if (data.reload.normal()) { if (data.reload.normal()) {
if (drum) { if (drum) {
if (grip) { if (grip) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m4.reload_normal_drum_grip")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m_4.reload_normal_drum_grip"));
} else { } else {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m4.reload_normal_drum")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m_4.reload_normal_drum"));
} }
} else { } else {
if (grip) { if (grip) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m4.reload_normal_grip")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m_4.reload_normal_grip"));
} else { } else {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m4.reload_normal")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m_4.reload_normal"));
} }
} }
} }
if (player.isSprinting() && player.onGround() && ClientEventHandler.cantSprint == 0 && ClientEventHandler.drawTime < 0.01) { if (player.isSprinting() && player.onGround() && ClientEventHandler.cantSprint == 0 && ClientEventHandler.drawTime < 0.01) {
if (ClientEventHandler.tacticalSprint) { if (ClientEventHandler.tacticalSprint) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m4.run_fast")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m_4.run_fast"));
} else { } else {
if (grip) { if (grip) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m4.run_grip")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m_4.run_grip"));
} else { } else {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m4.run")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m_4.run"));
} }
} }
} }
if (grip) { if (grip) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m4.idle_grip")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m_4.idle_grip"));
} else { } else {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m4.idle")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m_4.idle"));
} }
} }
@ -108,10 +108,10 @@ public class M4Item extends GunItem implements GeoItem {
if (!(stack.getItem() instanceof GunItem)) return PlayState.STOP; if (!(stack.getItem() instanceof GunItem)) return PlayState.STOP;
if (ClickHandler.isEditing) { if (ClickHandler.isEditing) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m4.edit")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m_4.edit"));
} }
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m4.idle")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m_4.idle"));
} }
@Override @Override
@ -164,7 +164,7 @@ public class M4Item extends GunItem implements GeoItem {
@Override @Override
public ResourceLocation getGunIcon() { public ResourceLocation getGunIcon() {
return Mod.loc("textures/gun_icon/m4_icon.png"); return Mod.loc("textures/gun_icon/m_4_icon.png");
} }
@Override @Override

View file

@ -1,11 +1,11 @@
{ {
"format_version": "1.8.0", "format_version": "1.8.0",
"animations": { "animations": {
"animation.m4.idle": { "animation.m_4.idle": {
"loop": true, "loop": true,
"animation_length": 1 "animation_length": 1
}, },
"animation.m4.idle_grip": { "animation.m_4.idle_grip": {
"loop": true, "loop": true,
"animation_length": 1, "animation_length": 1,
"bones": { "bones": {
@ -15,7 +15,7 @@
} }
} }
}, },
"animation.m4.edit": { "animation.m_4.edit": {
"loop": "hold_on_last_frame", "loop": "hold_on_last_frame",
"animation_length": 0.4083, "animation_length": 0.4083,
"bones": { "bones": {
@ -85,7 +85,7 @@
} }
} }
}, },
"animation.m4.run": { "animation.m_4.run": {
"loop": true, "loop": true,
"animation_length": 0.8, "animation_length": 0.8,
"bones": { "bones": {
@ -146,7 +146,7 @@
} }
} }
}, },
"animation.m4.run_grip": { "animation.m_4.run_grip": {
"loop": true, "loop": true,
"animation_length": 0.8, "animation_length": 0.8,
"bones": { "bones": {
@ -211,7 +211,7 @@
} }
} }
}, },
"animation.m4.run_fast": { "animation.m_4.run_fast": {
"loop": true, "loop": true,
"animation_length": 0.7, "animation_length": 0.7,
"bones": { "bones": {
@ -246,7 +246,7 @@
} }
} }
}, },
"animation.m4.reload_empty": { "animation.m_4.reload_empty": {
"loop": "hold_on_last_frame", "loop": "hold_on_last_frame",
"animation_length": 3.125, "animation_length": 3.125,
"bones": { "bones": {
@ -547,7 +547,7 @@
} }
} }
}, },
"animation.m4.reload_empty_grip": { "animation.m_4.reload_empty_grip": {
"loop": "hold_on_last_frame", "loop": "hold_on_last_frame",
"animation_length": 3.125, "animation_length": 3.125,
"bones": { "bones": {
@ -848,7 +848,7 @@
} }
} }
}, },
"animation.m4.reload_normal": { "animation.m_4.reload_normal": {
"loop": "hold_on_last_frame", "loop": "hold_on_last_frame",
"animation_length": 2.75, "animation_length": 2.75,
"bones": { "bones": {
@ -1132,7 +1132,7 @@
} }
} }
}, },
"animation.m4.reload_normal_grip": { "animation.m_4.reload_normal_grip": {
"loop": "hold_on_last_frame", "loop": "hold_on_last_frame",
"animation_length": 2.75, "animation_length": 2.75,
"bones": { "bones": {
@ -1418,7 +1418,7 @@
} }
} }
}, },
"animation.m4.reload_empty_drum": { "animation.m_4.reload_empty_drum": {
"loop": "hold_on_last_frame", "loop": "hold_on_last_frame",
"animation_length": 3.125, "animation_length": 3.125,
"bones": { "bones": {
@ -1719,7 +1719,7 @@
} }
} }
}, },
"animation.m4.reload_empty_drum_grip": { "animation.m_4.reload_empty_drum_grip": {
"loop": "hold_on_last_frame", "loop": "hold_on_last_frame",
"animation_length": 3.125, "animation_length": 3.125,
"bones": { "bones": {
@ -2020,7 +2020,7 @@
} }
} }
}, },
"animation.m4.reload_normal_drum": { "animation.m_4.reload_normal_drum": {
"loop": "hold_on_last_frame", "loop": "hold_on_last_frame",
"animation_length": 2.75, "animation_length": 2.75,
"bones": { "bones": {
@ -2304,7 +2304,7 @@
} }
} }
}, },
"animation.m4.reload_normal_drum_grip": { "animation.m_4.reload_normal_drum_grip": {
"loop": "hold_on_last_frame", "loop": "hold_on_last_frame",
"animation_length": 2.75, "animation_length": 2.75,
"bones": { "bones": {

View file

@ -3,7 +3,7 @@
"minecraft:geometry": [ "minecraft:geometry": [
{ {
"description": { "description": {
"identifier": "geometry.m4", "identifier": "geometry.m_4",
"texture_width": 256, "texture_width": 256,
"texture_height": 256, "texture_height": 256,
"visible_bounds_width": 34, "visible_bounds_width": 34,

View file

@ -1,27 +0,0 @@
{
"loader": "neoforge:separate_transforms",
"gui_light": "front",
"base": {
"parent": "superbwarfare:item/m_4_base"
},
"perspectives": {
"gui": {
"parent": "superbwarfare:item/m_4_icon"
},
"thirdperson_righthand": {
"parent": "superbwarfare:item/m43d"
},
"thirdperson_lefthand": {
"parent": "superbwarfare:item/m43d"
},
"ground": {
"parent": "superbwarfare:item/m43d"
},
"fixed": {
"parent": "superbwarfare:item/m43d"
},
"head": {
"parent": "superbwarfare:item/m43d"
}
}
}

View file

@ -1,6 +0,0 @@
{
"parent": "superbwarfare:displaysettings/m4.item",
"textures": {
"layer0": "superbwarfare:item/m4"
}
}

View file

@ -1,6 +0,0 @@
{
"parent": "item/generated",
"textures": {
"layer0": "superbwarfare:item/m4icon"
}
}

View file

@ -2,8 +2,8 @@
"credit": "Made with Blockbench", "credit": "Made with Blockbench",
"texture_size": [32, 32], "texture_size": [32, 32],
"textures": { "textures": {
"0": "superbwarfare:item/m43d", "0": "superbwarfare:item/lod/m_4",
"particle": "superbwarfare:item/m43d" "particle": "superbwarfare:item/lod/m_4"
}, },
"elements": [ "elements": [
{ {

View file

Before

Width:  |  Height:  |  Size: 369 B

After

Width:  |  Height:  |  Size: 369 B

View file

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 79 KiB

View file

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB