修复mp443动画缺失问题
This commit is contained in:
parent
1b51d87e95
commit
88e82121dd
5 changed files with 1882 additions and 8 deletions
|
@ -58,7 +58,7 @@ public class M1911ItemModel extends GeoModel<M1911Item> {
|
||||||
|
|
||||||
gun.setPosX(1.23f * (float) zp);
|
gun.setPosX(1.23f * (float) zp);
|
||||||
|
|
||||||
gun.setPosY(1.53f * (float) zp - (float) (0.2f * zpz));
|
gun.setPosY(1.3f * (float) zp - (float) (0.2f * zpz));
|
||||||
|
|
||||||
gun.setPosZ(7f * (float) zp + (float) (0.3f * zpz));
|
gun.setPosZ(7f * (float) zp + (float) (0.3f * zpz));
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ public class Mp443ItemModel extends GeoModel<Mp443Item> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResourceLocation getAnimationResource(Mp443Item animatable) {
|
public ResourceLocation getAnimationResource(Mp443Item animatable) {
|
||||||
return Mod.loc("animations/glock_17.animation.json");
|
return Mod.loc("animations/mp_443.animation.json");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.atsuishio.superbwarfare.client.overlay;
|
package com.atsuishio.superbwarfare.client.overlay;
|
||||||
|
|
||||||
import com.atsuishio.superbwarfare.Mod;
|
import com.atsuishio.superbwarfare.Mod;
|
||||||
|
import com.atsuishio.superbwarfare.entity.vehicle.base.VehicleEntity;
|
||||||
import com.atsuishio.superbwarfare.tools.FormatTool;
|
import com.atsuishio.superbwarfare.tools.FormatTool;
|
||||||
import com.atsuishio.superbwarfare.tools.TraceTool;
|
import com.atsuishio.superbwarfare.tools.TraceTool;
|
||||||
import net.minecraft.client.DeltaTracker;
|
import net.minecraft.client.DeltaTracker;
|
||||||
|
@ -43,6 +44,8 @@ public class SpyglassRangeOverlay implements LayeredDraw.Layer {
|
||||||
double entityRange = 0;
|
double entityRange = 0;
|
||||||
Entity lookingEntity = TraceTool.findLookingEntity(player, 520);
|
Entity lookingEntity = TraceTool.findLookingEntity(player, 520);
|
||||||
|
|
||||||
|
if (lookingEntity instanceof VehicleEntity) return;
|
||||||
|
|
||||||
if (lookingEntity != null) {
|
if (lookingEntity != null) {
|
||||||
lookAtEntity = true;
|
lookAtEntity = true;
|
||||||
entityRange = player.distanceTo(lookingEntity);
|
entityRange = player.distanceTo(lookingEntity);
|
||||||
|
|
|
@ -44,14 +44,15 @@ public class Mp443Item extends GunItem implements GeoItem {
|
||||||
if (!(stack.getItem() instanceof GunItem)) return PlayState.STOP;
|
if (!(stack.getItem() instanceof GunItem)) return PlayState.STOP;
|
||||||
|
|
||||||
if (GunData.from(stack).reload.empty()) {
|
if (GunData.from(stack).reload.empty()) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.glock17.reload_empty"));
|
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.mp_443.reload_empty"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GunData.from(stack).reload.normal()) {
|
if (GunData.from(stack).reload.normal()) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.glock17.reload_normal"));
|
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.mp_443.reload_normal"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.glock17.idle"));
|
|
||||||
|
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.mp_443.idle"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private PlayState idlePredicate(AnimationState<Mp443Item> event) {
|
private PlayState idlePredicate(AnimationState<Mp443Item> event) {
|
||||||
|
@ -64,13 +65,13 @@ public class Mp443Item extends GunItem implements GeoItem {
|
||||||
&& ClientEventHandler.cantSprint == 0
|
&& ClientEventHandler.cantSprint == 0
|
||||||
&& !(GunData.from(stack).reload.normal() || GunData.from(stack).reload.empty()) && ClientEventHandler.drawTime < 0.01) {
|
&& !(GunData.from(stack).reload.normal() || GunData.from(stack).reload.empty()) && ClientEventHandler.drawTime < 0.01) {
|
||||||
if (ClientEventHandler.tacticalSprint) {
|
if (ClientEventHandler.tacticalSprint) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.glock17.run_fast"));
|
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.mp_443.run_fast"));
|
||||||
} else {
|
} else {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.glock17.run"));
|
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.mp_443.run"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.glock17.idle"));
|
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.mp_443.idle"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue