还是AK添加配件
This commit is contained in:
parent
2604a615b0
commit
fd9cb5e205
16 changed files with 9331 additions and 9012 deletions
|
@ -1,4 +1,4 @@
|
|||
// 1.20.1 2024-10-23T17:29:33.3301118 Tags for minecraft:item mod id superbwarfare
|
||||
// 1.20.1 2024-10-24T18:54:05.6703834 Tags for minecraft:item mod id superbwarfare
|
||||
cf8d49a8d2872286d1a9c3d4a7e1c2b7690db0b8 data/forge/tags/items/dusts.json
|
||||
0fa06c2ff83bf09797e3ddff90f62d1124e645b4 data/forge/tags/items/dusts/coal_coke.json
|
||||
295ddf906b7133a0558d03e9a60eea18281fe430 data/forge/tags/items/dusts/iron.json
|
||||
|
@ -27,11 +27,11 @@ af6fd64b4a685c353f243763db268f7b2304c009 data/forge/tags/items/storage_blocks/le
|
|||
3743c2790deca7e779d3e4b82f092de39b446988 data/forge/tags/items/storage_blocks/steel.json
|
||||
144e54d908121dee498b2ebba3b24b09fd6f18d9 data/forge/tags/items/storage_blocks/tungsten.json
|
||||
4d4dfd25a2a749e000e1bb742c2f984d4e094e5d data/superbwarfare/tags/items/cannot_reload.json
|
||||
5e4b48e22d53f009abdfe557e5911c728ba5f715 data/superbwarfare/tags/items/can_apply_barrel.json
|
||||
73b1b24e00ea24b494900d06c03c03368f9433ff data/superbwarfare/tags/items/can_apply_barrel.json
|
||||
5e4b48e22d53f009abdfe557e5911c728ba5f715 data/superbwarfare/tags/items/can_apply_grip.json
|
||||
73b1b24e00ea24b494900d06c03c03368f9433ff data/superbwarfare/tags/items/can_apply_magazine.json
|
||||
73b1b24e00ea24b494900d06c03c03368f9433ff data/superbwarfare/tags/items/can_apply_scope.json
|
||||
5e4b48e22d53f009abdfe557e5911c728ba5f715 data/superbwarfare/tags/items/can_apply_stock.json
|
||||
73b1b24e00ea24b494900d06c03c03368f9433ff data/superbwarfare/tags/items/can_apply_stock.json
|
||||
73b1b24e00ea24b494900d06c03c03368f9433ff data/superbwarfare/tags/items/can_custom_gun.json
|
||||
dff9ff6d6637951191906cb55a210ae5a3ad5cd6 data/superbwarfare/tags/items/extra_one_ammo.json
|
||||
52598e22974c8da0d2852defe4c9005e1d67744b data/superbwarfare/tags/items/gun.json
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"values": [
|
||||
"superbwarfare:ak_12"
|
||||
"superbwarfare:ak_12",
|
||||
"superbwarfare:ak_47"
|
||||
]
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"values": [
|
||||
"superbwarfare:ak_12"
|
||||
"superbwarfare:ak_12",
|
||||
"superbwarfare:ak_47"
|
||||
]
|
||||
}
|
|
@ -37,6 +37,7 @@ public class AK47ItemModel extends GeoModel<AK47Item> {
|
|||
CoreGeoBone gun = getAnimationProcessor().getBone("bone");
|
||||
CoreGeoBone shen = getAnimationProcessor().getBone("shen");
|
||||
CoreGeoBone scope = getAnimationProcessor().getBone("Scope1");
|
||||
CoreGeoBone scope2 = getAnimationProcessor().getBone("Scope2");
|
||||
CoreGeoBone shuan = getAnimationProcessor().getBone("shuan");
|
||||
|
||||
Player player = Minecraft.getInstance().player;
|
||||
|
@ -63,28 +64,44 @@ public class AK47ItemModel extends GeoModel<AK47Item> {
|
|||
|
||||
int type = GunsTool.getAttachmentType(stack, GunsTool.AttachmentType.SCOPE);
|
||||
|
||||
float posYAlt = switch (type) {
|
||||
case 2 -> 0.45f;
|
||||
case 3 -> 0.5f;
|
||||
default -> 0f;
|
||||
};
|
||||
|
||||
float posX = switch (type) {
|
||||
case 0, 1, 3 -> 1.962f;
|
||||
case 2 -> 1.852f;
|
||||
default -> 0f;
|
||||
};
|
||||
float posY = switch (type) {
|
||||
case 0,2,3 -> 1.071f;
|
||||
case 0 -> 1.071f;
|
||||
case 1 -> 0.261f;
|
||||
case 2 -> 0.162f + posYAlt;
|
||||
case 3 -> 0.263f;
|
||||
default -> 0f;
|
||||
};
|
||||
float scaleZ = switch (type) {
|
||||
case 0,2,3 -> 0.55f;
|
||||
case 0 -> 0.55f;
|
||||
case 1 -> 0.2f;
|
||||
case 2 -> 0.87f;
|
||||
case 3 -> 0.78f;
|
||||
default -> 0f;
|
||||
};
|
||||
float posZ = switch (type) {
|
||||
case 0, 1 -> 2.8f;
|
||||
case 2 -> 4.2f;
|
||||
case 3 -> 4.3f;
|
||||
default -> 0f;
|
||||
};
|
||||
// float posZ = switch (type) {
|
||||
// case 0, 1 -> 2.8f;
|
||||
// case 2 -> 2.8f;
|
||||
// case 3 -> 2.8f;
|
||||
// default -> 0f;
|
||||
// };
|
||||
|
||||
gun.setPosX(1.962f * (float) zp);
|
||||
gun.setPosY(posY * (float) zp - (float) (0.2f * zpz));
|
||||
gun.setPosZ(2.8f * (float) zp + (float) (0.5f * zpz));
|
||||
gun.setPosX(posX * (float) zp);
|
||||
gun.setPosY((posY) * (float) zp - (float) (0.2f * zpz) - posYAlt);
|
||||
gun.setPosZ(posZ * (float) zp + (float) (0.5f * zpz));
|
||||
gun.setScaleZ(1f - (scaleZ * (float) zp));
|
||||
scope.setScaleZ(1f - (0.4f * (float) zp));
|
||||
scope2.setScaleZ(1f - (0.3f * (float) zp));
|
||||
|
||||
stack.getOrCreateTag().putBoolean("HoloHidden", !(gun.getPosX() > 1.8));
|
||||
|
||||
|
@ -115,7 +132,7 @@ public class AK47ItemModel extends GeoModel<AK47Item> {
|
|||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
CoreGeoBone main = getAnimationProcessor().getBone("0");
|
||||
|
||||
float numR = (float) (1 - 0.94 * zt);
|
||||
float numR = (float) (1 - 0.98 * zt);
|
||||
float numP = (float) (1 - 0.92 * zt);
|
||||
|
||||
if (stack.getOrCreateTag().getInt("gun_reloading_time") > 0) {
|
||||
|
|
|
@ -90,11 +90,11 @@ public class AK47ItemRenderer extends GeoItemRenderer<AK47Item> {
|
|||
|| GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.SCOPE) != 1);
|
||||
}
|
||||
|
||||
// if (name.equals("Cross2")) {
|
||||
// bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden")
|
||||
// || GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS
|
||||
// || GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.SCOPE) != 2);
|
||||
// }
|
||||
if (name.equals("Cross2")) {
|
||||
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden")
|
||||
|| GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS
|
||||
|| GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.SCOPE) != 2);
|
||||
}
|
||||
|
||||
// if (name.equals("Cross3")) {
|
||||
// bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden")
|
||||
|
@ -102,10 +102,10 @@ public class AK47ItemRenderer extends GeoItemRenderer<AK47Item> {
|
|||
// || GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.SCOPE) != 3);
|
||||
// }
|
||||
|
||||
// if (GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.SCOPE) == 2
|
||||
// && (name.equals("hidden"))) {
|
||||
// bone.setHidden(!itemStack.getOrCreateTag().getBoolean("HoloHidden") && GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS);
|
||||
// }
|
||||
if (GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.SCOPE) == 2
|
||||
&& (name.equals("Hidden") || name.equals("Barrel") || name.equals("humu") || name.equals("qiangguan") || name.equals("houzhunxing"))) {
|
||||
bone.setHidden(!itemStack.getOrCreateTag().getBoolean("HoloHidden") && GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS);
|
||||
}
|
||||
//
|
||||
// if (GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.SCOPE) == 3
|
||||
// && (name.equals("jing") || name.equals("Barrel") || name.equals("humu") || name.equals("qiangguan") || name.equals("houzhunxing"))) {
|
||||
|
@ -113,9 +113,6 @@ public class AK47ItemRenderer extends GeoItemRenderer<AK47Item> {
|
|||
// }
|
||||
|
||||
if (name.equals("flare")) {
|
||||
// if (GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.BARREL) == 1) {
|
||||
// bone.setPosZ(2.25f);
|
||||
// }
|
||||
if (itemStack.getOrCreateTag().getDouble("flash_time") == 0 || GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.BARREL) == 2) {
|
||||
bone.setHidden(true);
|
||||
} else {
|
||||
|
@ -126,10 +123,6 @@ public class AK47ItemRenderer extends GeoItemRenderer<AK47Item> {
|
|||
}
|
||||
}
|
||||
|
||||
if (name.equals("daogui")) {
|
||||
bone.setHidden(GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.SCOPE) == 0);
|
||||
}
|
||||
|
||||
if (name.equals("Mag0")) {
|
||||
bone.setHidden(GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.MAGAZINE) != 0);
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ public class ModItemTagProvider extends ItemTagsProvider {
|
|||
|
||||
this.tag(ModTags.Items.CAN_CUSTOM_GUN).add(ModItems.AK_12.get(), ModItems.AK_47.get());
|
||||
|
||||
this.tag(ModTags.Items.CAN_APPLY_BARREL).add(ModItems.AK_12.get());
|
||||
this.tag(ModTags.Items.CAN_APPLY_BARREL).add(ModItems.AK_12.get(), ModItems.AK_47.get());
|
||||
|
||||
this.tag(ModTags.Items.CAN_APPLY_GRIP).add(ModItems.AK_12.get());
|
||||
|
||||
|
@ -122,7 +122,7 @@ public class ModItemTagProvider extends ItemTagsProvider {
|
|||
|
||||
this.tag(ModTags.Items.CAN_APPLY_MAGAZINE).add(ModItems.AK_12.get(), ModItems.AK_47.get());
|
||||
|
||||
this.tag(ModTags.Items.CAN_APPLY_STOCK).add(ModItems.AK_12.get());
|
||||
this.tag(ModTags.Items.CAN_APPLY_STOCK).add(ModItems.AK_12.get(), ModItems.AK_47.get());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -70,8 +70,12 @@ public class ModSounds {
|
|||
|
||||
public static final RegistryObject<SoundEvent> AK_47_FIRE_1P = REGISTRY.register("ak_47_fire_1p", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_47_fire_1p")));
|
||||
public static final RegistryObject<SoundEvent> AK_47_FIRE_3P = REGISTRY.register("ak_47_fire_3p", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_47_fire_3p")));
|
||||
public static final RegistryObject<SoundEvent> AK_47_FIRE_1P_S = REGISTRY.register("ak_47_fire_1p_s", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_47_fire_1p_s")));
|
||||
public static final RegistryObject<SoundEvent> AK_47_FIRE_3P_S = REGISTRY.register("ak_47_fire_3p_s", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_47_fire_3p_s")));
|
||||
public static final RegistryObject<SoundEvent> AK_47_FAR = REGISTRY.register("ak_47_far", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_47_far")));
|
||||
public static final RegistryObject<SoundEvent> AK_47_VERYFAR = REGISTRY.register("ak_47_veryfar", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_47_veryfar")));
|
||||
public static final RegistryObject<SoundEvent> AK_47_FAR_S = REGISTRY.register("ak_47_far_s", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_12_far_s")));
|
||||
public static final RegistryObject<SoundEvent> AK_47_VERYFAR_S = REGISTRY.register("ak_47_veryfar_s", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_12_veryfar_s")));
|
||||
public static final RegistryObject<SoundEvent> AK_47_RELOAD_NORMAL = REGISTRY.register("ak_47_reload_normal", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_47_reload_normal")));
|
||||
public static final RegistryObject<SoundEvent> AK_47_RELOAD_NORMAL_DRUM = REGISTRY.register("ak_47_reload_normal_drum", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_47_reload_normal_drum")));
|
||||
public static final RegistryObject<SoundEvent> AK_47_RELOAD_EMPTY = REGISTRY.register("ak_47_reload_empty", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "ak_47_reload_empty")));
|
||||
|
|
|
@ -185,30 +185,30 @@ public abstract class GunItem extends Item {
|
|||
double scopeWeight = switch (tag.getInt("Scope")) {
|
||||
case 1 -> 0.5;
|
||||
case 2 -> 1;
|
||||
case 3 -> 2;
|
||||
case 3 -> 1.5;
|
||||
default -> 0;
|
||||
};
|
||||
|
||||
double barrelWeight = switch (tag.getInt("Barrel")) {
|
||||
case 1 -> 0.5;
|
||||
case 2 -> 1;
|
||||
default -> 0;
|
||||
};
|
||||
|
||||
double magazineWeight = switch (tag.getInt("Magazine")) {
|
||||
case 1 -> 1;
|
||||
case 2 -> 2;
|
||||
default -> 0;
|
||||
};
|
||||
|
||||
double magazineWeight = switch (tag.getInt("Magazine")) {
|
||||
case 1 -> 1.5;
|
||||
case 2 -> 3;
|
||||
default -> 0;
|
||||
};
|
||||
|
||||
double stockWeight = switch (tag.getInt("Stock")) {
|
||||
case 1 -> -2;
|
||||
case 2 -> 2;
|
||||
case 2 -> 1.5;
|
||||
default -> 0;
|
||||
};
|
||||
|
||||
double gripWeight = switch (tag.getInt("Grip")) {
|
||||
case 1, 2 -> 0.5;
|
||||
case 1, 2 -> 0.25;
|
||||
case 3 -> 1;
|
||||
default -> 0;
|
||||
};
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -247,6 +247,14 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"ak_47_fire_1p_s": {
|
||||
"sounds": [
|
||||
{
|
||||
"name": "superbwarfare:ak_47/ak_47_fire_1p_s",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"ak_47_fire_3p": {
|
||||
"sounds": [
|
||||
{
|
||||
|
@ -255,6 +263,14 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"ak_47_fire_3p_s": {
|
||||
"sounds": [
|
||||
{
|
||||
"name": "superbwarfare:ak_47/ak_47_fire_3p_s",
|
||||
"stream": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"ak_47_far": {
|
||||
"sounds": [
|
||||
{
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 87 KiB |
Binary file not shown.
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 62 KiB |
Binary file not shown.
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Loading…
Add table
Reference in a new issue