完成AK的配件
This commit is contained in:
parent
a9229a149d
commit
8f1d5f82e2
5 changed files with 2540 additions and 13 deletions
|
@ -86,7 +86,7 @@ public class AK12ItemModel extends GeoModel<AK12Item> {
|
||||||
float posZ = switch (type) {
|
float posZ = switch (type) {
|
||||||
case 0, 1 -> 2.8f;
|
case 0, 1 -> 2.8f;
|
||||||
case 2 -> 4.1f;
|
case 2 -> 4.1f;
|
||||||
case 3 -> 4.3f;
|
case 3 -> 4.5f;
|
||||||
default -> 0f;
|
default -> 0f;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,8 @@ public class AK47ItemModel extends GeoModel<AK47Item> {
|
||||||
CoreGeoBone shen = getAnimationProcessor().getBone("shen");
|
CoreGeoBone shen = getAnimationProcessor().getBone("shen");
|
||||||
CoreGeoBone scope = getAnimationProcessor().getBone("Scope1");
|
CoreGeoBone scope = getAnimationProcessor().getBone("Scope1");
|
||||||
CoreGeoBone scope2 = getAnimationProcessor().getBone("Scope2");
|
CoreGeoBone scope2 = getAnimationProcessor().getBone("Scope2");
|
||||||
|
CoreGeoBone scope3 = getAnimationProcessor().getBone("Scope3");
|
||||||
|
CoreGeoBone cross3 = getAnimationProcessor().getBone("Cross3");
|
||||||
CoreGeoBone shuan = getAnimationProcessor().getBone("shuan");
|
CoreGeoBone shuan = getAnimationProcessor().getBone("shuan");
|
||||||
|
|
||||||
Player player = Minecraft.getInstance().player;
|
Player player = Minecraft.getInstance().player;
|
||||||
|
@ -79,7 +81,7 @@ public class AK47ItemModel extends GeoModel<AK47Item> {
|
||||||
case 0 -> 1.071f;
|
case 0 -> 1.071f;
|
||||||
case 1 -> 0.261f;
|
case 1 -> 0.261f;
|
||||||
case 2 -> 0.162f + posYAlt;
|
case 2 -> 0.162f + posYAlt;
|
||||||
case 3 -> 0.263f;
|
case 3 -> 0.099f + posYAlt;
|
||||||
default -> 0f;
|
default -> 0f;
|
||||||
};
|
};
|
||||||
float scaleZ = switch (type) {
|
float scaleZ = switch (type) {
|
||||||
|
@ -92,7 +94,7 @@ public class AK47ItemModel extends GeoModel<AK47Item> {
|
||||||
float posZ = switch (type) {
|
float posZ = switch (type) {
|
||||||
case 0, 1 -> 2.8f;
|
case 0, 1 -> 2.8f;
|
||||||
case 2 -> 4.2f;
|
case 2 -> 4.2f;
|
||||||
case 3 -> 4.3f;
|
case 3 -> 3.9f;
|
||||||
default -> 0f;
|
default -> 0f;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -102,6 +104,7 @@ public class AK47ItemModel extends GeoModel<AK47Item> {
|
||||||
gun.setScaleZ(1f - (scaleZ * (float) zp));
|
gun.setScaleZ(1f - (scaleZ * (float) zp));
|
||||||
scope.setScaleZ(1f - (0.4f * (float) zp));
|
scope.setScaleZ(1f - (0.4f * (float) zp));
|
||||||
scope2.setScaleZ(1f - (0.3f * (float) zp));
|
scope2.setScaleZ(1f - (0.3f * (float) zp));
|
||||||
|
scope3.setScaleZ(1f - (0.7f * (float) zp));
|
||||||
|
|
||||||
stack.getOrCreateTag().putBoolean("HoloHidden", !(gun.getPosX() > 1.8));
|
stack.getOrCreateTag().putBoolean("HoloHidden", !(gun.getPosX() > 1.8));
|
||||||
|
|
||||||
|
@ -121,6 +124,9 @@ public class AK47ItemModel extends GeoModel<AK47Item> {
|
||||||
|
|
||||||
shuan.setPosZ(2.4f * (float) fp);
|
shuan.setPosZ(2.4f * (float) fp);
|
||||||
|
|
||||||
|
cross3.setRotZ(0.01f * (float) (ClientEventHandler.recoilHorizon * fp));
|
||||||
|
cross3.setPosY(-0.23f * (float) (fp + 2.3 * fr));
|
||||||
|
|
||||||
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
||||||
|
|
||||||
root.setPosX((float) (movePosX + 20 * ClientEventHandler.drawTime + 9.3f * mph));
|
root.setPosX((float) (movePosX + 20 * ClientEventHandler.drawTime + 9.3f * mph));
|
||||||
|
|
|
@ -96,21 +96,21 @@ public class AK47ItemRenderer extends GeoItemRenderer<AK47Item> {
|
||||||
|| GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.SCOPE) != 2);
|
|| GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.SCOPE) != 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (name.equals("Cross3")) {
|
if (name.equals("Cross3")) {
|
||||||
// bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden")
|
bone.setHidden(itemStack.getOrCreateTag().getBoolean("HoloHidden")
|
||||||
// || GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS
|
|| GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) != GLFW.GLFW_PRESS
|
||||||
// || GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.SCOPE) != 3);
|
|| GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.SCOPE) != 3);
|
||||||
// }
|
}
|
||||||
|
|
||||||
if (GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.SCOPE) == 2
|
if (GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.SCOPE) == 2
|
||||||
&& (name.equals("Hidden") || name.equals("Barrel") || name.equals("humu") || name.equals("qiangguan") || name.equals("houzhunxing"))) {
|
&& (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);
|
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
|
if (GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.SCOPE) == 3
|
||||||
// && (name.equals("jing") || name.equals("Barrel") || name.equals("humu") || name.equals("qiangguan") || name.equals("houzhunxing"))) {
|
&& (name.equals("jing") || 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);
|
bone.setHidden(!itemStack.getOrCreateTag().getBoolean("HoloHidden") && GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS);
|
||||||
// }
|
}
|
||||||
|
|
||||||
if (name.equals("flare")) {
|
if (name.equals("flare")) {
|
||||||
if (itemStack.getOrCreateTag().getDouble("flash_time") == 0 || GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.BARREL) == 2) {
|
if (itemStack.getOrCreateTag().getDouble("flash_time") == 0 || GunsTool.getAttachmentType(itemStack, GunsTool.AttachmentType.BARREL) == 2) {
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 70 KiB |
Loading…
Add table
Reference in a new issue