去营业妨碍化VECTOR,重制短剑动画,优化曳光弹
|
@ -26,9 +26,17 @@ public class ModelBullet<T extends Entity> extends EntityModel<T> {
|
|||
public static LayerDefinition createBodyLayer() {
|
||||
MeshDefinition meshdefinition = new MeshDefinition();
|
||||
PartDefinition partdefinition = meshdefinition.getRoot();
|
||||
|
||||
PartDefinition bone = partdefinition.addOrReplaceChild("bone", CubeListBuilder.create(), PartPose.offset(0.0F, 8.0F, 0.0F));
|
||||
PartDefinition bone2 = bone.addOrReplaceChild("bone2", CubeListBuilder.create(), PartPose.offset(-2.1213F, 8.5F, 0.0F));
|
||||
PartDefinition cube_r1 = bone2.addOrReplaceChild("cube_r1", CubeListBuilder.create().texOffs(1, 1).addBox(-1.5F, -21.5F, -1.5F, 1.0F, 5.0F, 1.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, 0.0F, 0.0F, 0.0F, 0.7854F, 0.0F));
|
||||
|
||||
PartDefinition bone2 = bone.addOrReplaceChild("bone2", CubeListBuilder.create().texOffs(0, 0).addBox(-1.4142F, -92.5F, -1.2071F, 0.0F, 15.0F, 1.0F, new CubeDeformation(0.0F)), PartPose.offset(-2.1213F, 8.5F, 0.0F));
|
||||
|
||||
PartDefinition cube_r1 = bone2.addOrReplaceChild("cube_r1", CubeListBuilder.create().texOffs(0, 0).addBox(-0.5F, 0.0F, -0.5F, 1.0F, 0.0F, 1.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-1.4142F, -92.1F, -0.7071F, 0.0F, 0.7854F, 0.0F));
|
||||
|
||||
PartDefinition cube_r2 = bone2.addOrReplaceChild("cube_r2", CubeListBuilder.create().texOffs(0, 0).addBox(0.0F, -7.5F, -0.5F, 0.0F, 15.0F, 1.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-1.4142F, -85.0F, -0.7071F, 0.0F, -2.0944F, 0.0F));
|
||||
|
||||
PartDefinition cube_r3 = bone2.addOrReplaceChild("cube_r3", CubeListBuilder.create().texOffs(0, 0).addBox(0.0F, -7.5F, -0.5F, 0.0F, 15.0F, 1.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-1.4142F, -85.0F, -0.7071F, 0.0F, -1.0472F, 0.0F));
|
||||
|
||||
return LayerDefinition.create(meshdefinition, 16, 16);
|
||||
}
|
||||
|
||||
|
|
|
@ -40,17 +40,15 @@ public class VectorItemModel extends GeoModel<VectorItem> {
|
|||
double zp = 0;
|
||||
zp = player.getPersistentData().getDouble("zoom_pos_z");
|
||||
|
||||
gun.setPosX(2.62f * (float) p);
|
||||
gun.setPosX(2.35f * (float) p);
|
||||
|
||||
gun.setPosY(0.9f * (float) p - (float) (0.6f * zp));
|
||||
gun.setPosY(0.74f * (float) p - (float) (0.2f * zp));
|
||||
|
||||
gun.setPosZ(3f * (float) p + (float) (0.5f * zp));
|
||||
|
||||
gun.setRotZ(-0.087f * (float) p + (float) (0.05f * zp));
|
||||
gun.setPosZ(5f * (float) p + (float) (0.3f * zp));
|
||||
|
||||
gun.setScaleZ(1f - (0.5f * (float) p));
|
||||
|
||||
scope.setScaleZ(1f - (0.6f * (float) p));
|
||||
scope.setScaleZ(1f - (0.2f * (float) p));
|
||||
|
||||
float fps = Minecraft.getInstance().getFps();
|
||||
if (fps <= 0) {
|
||||
|
@ -59,12 +57,10 @@ public class VectorItemModel extends GeoModel<VectorItem> {
|
|||
float times = 250f / fps;
|
||||
|
||||
CoreGeoBone holo = getAnimationProcessor().getBone("holo");
|
||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).zooming && gun.getPosX() > 2.45) {
|
||||
holo.setScaleX(1);
|
||||
holo.setScaleY(1);
|
||||
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).zooming && gun.getPosX() > 2) {
|
||||
holo.setHidden(false);
|
||||
} else {
|
||||
holo.setScaleX(0);
|
||||
holo.setScaleY(0);
|
||||
holo.setHidden(true);
|
||||
}
|
||||
|
||||
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||
|
@ -135,5 +131,13 @@ public class VectorItemModel extends GeoModel<VectorItem> {
|
|||
move.setRotY(0.7f * Mth.DEG_TO_RAD * (float) yRot);
|
||||
|
||||
move.setRotZ(2.7f * (float) m + Mth.DEG_TO_RAD * (float) zRot);
|
||||
|
||||
CoreGeoBone camera = getAnimationProcessor().getBone("camera");
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_x", Mth.RAD_TO_DEG * camera.getRotX());
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_y", Mth.RAD_TO_DEG * camera.getRotY());
|
||||
|
||||
player.getPersistentData().putDouble("camera_rot_z", Mth.RAD_TO_DEG * camera.getRotZ());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ import net.minecraft.util.Mth;
|
|||
|
||||
public class ProjectileRenderer extends EntityRenderer<ProjectileEntity> {
|
||||
private static final ResourceLocation texture = new ResourceLocation("target:textures/entity/bullet_tex.png");
|
||||
private static final ResourceLocation empty_texture = new ResourceLocation("target:textures/entity/empty.png");
|
||||
private final ModelBullet<ProjectileEntity> model;
|
||||
|
||||
public ProjectileRenderer(EntityRendererProvider.Context context) {
|
||||
|
@ -40,6 +41,9 @@ public class ProjectileRenderer extends EntityRenderer<ProjectileEntity> {
|
|||
|
||||
@Override
|
||||
public ResourceLocation getTextureLocation(ProjectileEntity entity) {
|
||||
return texture;
|
||||
if (entity.tickCount > 1){
|
||||
return texture;
|
||||
}
|
||||
return empty_texture;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -133,11 +133,11 @@ public class VectorItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
}
|
||||
|
||||
if (stack.getOrCreateTag().getBoolean("reloading") && stack.getOrCreateTag().getBoolean("empty_reload")) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.vec.reload"));
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.vec.reload_empty"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getBoolean("reloading") && !stack.getOrCreateTag().getBoolean("empty_reload")) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.vec.reload2"));
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.vec.reload_normal"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getInt("fire_mode") == 0 && stack.getOrCreateTag().getDouble("cg") > 0) {
|
||||
|
@ -227,7 +227,7 @@ public class VectorItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
GunsTool.reload(entity, GunInfo.Type.HANDGUN);
|
||||
}
|
||||
} else if (tag.getBoolean("reloading") && tag.getInt("ammo") > 0) {
|
||||
if (tag.getDouble("reload_time") == 47) {
|
||||
if (tag.getDouble("reload_time") == 43) {
|
||||
entity.getPersistentData().putDouble("id", id);
|
||||
if (entity instanceof ServerPlayer serverPlayer) {
|
||||
serverPlayer.connection.send(new ClientboundSoundPacket(new Holder.Direct<>(ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("target:vector_reload_normal"))),
|
||||
|
|
|
@ -127,7 +127,7 @@ public class PlayerReloadProcedure {
|
|||
tag.putBoolean("reloading", true);
|
||||
tag.putBoolean("empty_reload", false);
|
||||
tag.putDouble("id", (Mth.nextDouble(RandomSource.create(), 1, 1919810)));
|
||||
tag.putDouble("reload_time", 47);
|
||||
tag.putDouble("reload_time", 43);
|
||||
} else if (tag.getInt("ammo") == 0) {
|
||||
tag.putBoolean("reloading", true);
|
||||
tag.putDouble("empty_reload", 1);
|
||||
|
|
|
@ -38,6 +38,11 @@
|
|||
-5.75,
|
||||
4.25,
|
||||
2
|
||||
],
|
||||
"scale": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
"gui": {
|
||||
|
|
|
@ -31,20 +31,15 @@
|
|||
]
|
||||
},
|
||||
"firstperson_righthand": {
|
||||
"rotation": [
|
||||
0,
|
||||
0,
|
||||
5
|
||||
],
|
||||
"translation": [
|
||||
1.75,
|
||||
-19,
|
||||
-24.25
|
||||
-4.25,
|
||||
-2.75,
|
||||
-8
|
||||
],
|
||||
"scale": [
|
||||
4,
|
||||
4,
|
||||
4
|
||||
2,
|
||||
2,
|
||||
2
|
||||
]
|
||||
},
|
||||
"firstperson_lefthand": {
|
||||
|
@ -71,9 +66,9 @@
|
|||
0
|
||||
],
|
||||
"scale": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
0.55,
|
||||
0.55,
|
||||
0.55
|
||||
]
|
||||
},
|
||||
"gui": {
|
||||
|
@ -83,8 +78,8 @@
|
|||
0
|
||||
],
|
||||
"translation": [
|
||||
-0.25,
|
||||
-0.5,
|
||||
-1,
|
||||
0.25,
|
||||
0
|
||||
],
|
||||
"scale": [
|
||||
|
|
Before Width: | Height: | Size: 117 B After Width: | Height: | Size: 634 B |
BIN
src/main/resources/assets/target/textures/entity/empty.png
Normal file
After Width: | Height: | Size: 96 B |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 8.7 KiB |
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"zoom_speed": 1.6,
|
||||
"zoom": 1.25,
|
||||
"dev": 3.5,
|
||||
"dev": 2.3,
|
||||
"recoil_x": 0.007,
|
||||
"recoil_y": 0.007,
|
||||
"damage": 4.5,
|
||||
"headshot": 1.5,
|
||||
"velocity": 14,
|
||||
"velocity": 16,
|
||||
"mag": 33,
|
||||
"projectile_amount": 1,
|
||||
"fire_interval": 1,
|
||||
|
|