添加哨兵的战术冲刺动画,调整木仓口火焰大小
This commit is contained in:
parent
6d6861754e
commit
0a99e0919a
13 changed files with 123 additions and 23 deletions
|
@ -79,9 +79,14 @@ public class AK47ItemModel extends GeoModel<AK47Item> {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setHidden(false);
|
flare.setHidden(false);
|
||||||
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (0.7 + 0.5 * (Math.random() - 0.5)));
|
||||||
flare.setScaleY((float) (1 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleY((float) (0.7 + 0.5 * (Math.random() - 0.5)));
|
||||||
flare.setRotZ((float) (0.5 * (Math.random() - 0.5)));
|
flare.setRotZ((float) (0.5 * (Math.random() - 0.5)));
|
||||||
|
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||||
|
flare.setPosY(-0.75f);
|
||||||
|
} else {
|
||||||
|
flare.setPosY(0);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
flare.setHidden(true);
|
flare.setHidden(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,8 +94,8 @@ public class DevotionItemModel extends GeoModel<Devotion> {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setHidden(false);
|
flare.setHidden(false);
|
||||||
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (0.6 + 0.5 * (Math.random() - 0.5)));
|
||||||
flare.setScaleY((float) (1 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleY((float) (0.6 + 0.5 * (Math.random() - 0.5)));
|
||||||
flare.setRotZ((float) (0.5 * (Math.random() - 0.5)));
|
flare.setRotZ((float) (0.5 * (Math.random() - 0.5)));
|
||||||
} else {
|
} else {
|
||||||
flare.setHidden(true);
|
flare.setHidden(true);
|
||||||
|
|
|
@ -44,8 +44,8 @@ public class Hk416ItemModel extends GeoModel<Hk416Item> {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setHidden(false);
|
flare.setHidden(false);
|
||||||
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (0.6 + 0.5 * (Math.random() - 0.5)));
|
||||||
flare.setScaleY((float) (1 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleY((float) (0.6 + 0.5 * (Math.random() - 0.5)));
|
||||||
flare.setRotZ((float) (0.5 * (Math.random() - 0.5)));
|
flare.setRotZ((float) (0.5 * (Math.random() - 0.5)));
|
||||||
} else {
|
} else {
|
||||||
flare.setHidden(true);
|
flare.setHidden(true);
|
||||||
|
|
|
@ -75,8 +75,8 @@ public class M4ItemModel extends GeoModel<M4Item> {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setHidden(false);
|
flare.setHidden(false);
|
||||||
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (0.55 + 0.5 * (Math.random() - 0.5)));
|
||||||
flare.setScaleY((float) (1 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleY((float) (0.55 + 0.5 * (Math.random() - 0.5)));
|
||||||
flare.setRotZ((float) (0.5 * (Math.random() - 0.5)));
|
flare.setRotZ((float) (0.5 * (Math.random() - 0.5)));
|
||||||
} else {
|
} else {
|
||||||
flare.setHidden(true);
|
flare.setHidden(true);
|
||||||
|
|
|
@ -118,8 +118,8 @@ public class M60ItemModel extends GeoModel<M60Item> {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setHidden(false);
|
flare.setHidden(false);
|
||||||
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (0.75 + 0.5 * (Math.random() - 0.5)));
|
||||||
flare.setScaleY((float) (1 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleY((float) (0.75 + 0.5 * (Math.random() - 0.5)));
|
||||||
flare.setRotZ((float) (0.5 * (Math.random() - 0.5)));
|
flare.setRotZ((float) (0.5 * (Math.random() - 0.5)));
|
||||||
} else {
|
} else {
|
||||||
flare.setHidden(true);
|
flare.setHidden(true);
|
||||||
|
|
|
@ -115,9 +115,14 @@ public class Mk14ItemModel extends GeoModel<Mk14Item> {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setHidden(false);
|
flare.setHidden(false);
|
||||||
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (0.5 + 0.5 * (Math.random() - 0.5)));
|
||||||
flare.setScaleY((float) (1 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleY((float) (0.5 + 0.5 * (Math.random() - 0.5)));
|
||||||
flare.setRotZ((float) (0.5 * (Math.random() - 0.5)));
|
flare.setRotZ((float) (0.5 * (Math.random() - 0.5)));
|
||||||
|
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
|
||||||
|
flare.setPosY(-3.5f);
|
||||||
|
} else {
|
||||||
|
flare.setPosY(0);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
flare.setHidden(true);
|
flare.setHidden(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,8 +96,8 @@ public class RpkItemModel extends GeoModel<RpkItem> {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setHidden(false);
|
flare.setHidden(false);
|
||||||
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (0.7 + 0.5 * (Math.random() - 0.5)));
|
||||||
flare.setScaleY((float) (1 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleY((float) (0.7 + 0.5 * (Math.random() - 0.5)));
|
||||||
flare.setRotZ((float) (0.5 * (Math.random() - 0.5)));
|
flare.setRotZ((float) (0.5 * (Math.random() - 0.5)));
|
||||||
} else {
|
} else {
|
||||||
flare.setHidden(true);
|
flare.setHidden(true);
|
||||||
|
|
|
@ -146,8 +146,8 @@ public class SentinelItemModel extends GeoModel<SentinelItem> {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setHidden(false);
|
flare.setHidden(false);
|
||||||
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (0.75 + 0.5 * (Math.random() - 0.5)));
|
||||||
flare.setScaleY((float) (1 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleY((float) (0.75 + 0.5 * (Math.random() - 0.5)));
|
||||||
flare.setRotZ((float) (0.5 * (Math.random() - 0.5)));
|
flare.setRotZ((float) (0.5 * (Math.random() - 0.5)));
|
||||||
} else {
|
} else {
|
||||||
flare.setHidden(true);
|
flare.setHidden(true);
|
||||||
|
|
|
@ -86,8 +86,8 @@ public class SksItemModel extends GeoModel<SksItem> {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setHidden(false);
|
flare.setHidden(false);
|
||||||
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (0.55 + 0.5 * (Math.random() - 0.5)));
|
||||||
flare.setScaleY((float) (1 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleY((float) (0.55 + 0.5 * (Math.random() - 0.5)));
|
||||||
flare.setRotZ((float) (0.5 * (Math.random() - 0.5)));
|
flare.setRotZ((float) (0.5 * (Math.random() - 0.5)));
|
||||||
} else {
|
} else {
|
||||||
flare.setHidden(true);
|
flare.setHidden(true);
|
||||||
|
|
|
@ -109,8 +109,8 @@ public class SvdItemModel extends GeoModel<SvdItem> {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setHidden(false);
|
flare.setHidden(false);
|
||||||
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (0.8 + 0.5 * (Math.random() - 0.5)));
|
||||||
flare.setScaleY((float) (1 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleY((float) (0.8 + 0.5 * (Math.random() - 0.5)));
|
||||||
flare.setRotZ((float) (0.5 * (Math.random() - 0.5)));
|
flare.setRotZ((float) (0.5 * (Math.random() - 0.5)));
|
||||||
} else {
|
} else {
|
||||||
flare.setHidden(true);
|
flare.setHidden(true);
|
||||||
|
|
|
@ -22,6 +22,7 @@ import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
|
import net.minecraft.world.effect.MobEffects;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
import net.minecraft.world.entity.EquipmentSlot;
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
|
@ -173,8 +174,12 @@ public class SentinelItem extends GunItem implements GeoItem, AnimatedItem {
|
||||||
&& player.getPersistentData().getDouble("noRun") == 0
|
&& player.getPersistentData().getDouble("noRun") == 0
|
||||||
&& !(stack.getOrCreateTag().getBoolean("is_normal_reloading") || stack.getOrCreateTag().getBoolean("is_empty_reloading"))
|
&& !(stack.getOrCreateTag().getBoolean("is_normal_reloading") || stack.getOrCreateTag().getBoolean("is_empty_reloading"))
|
||||||
&& !stack.getOrCreateTag().getBoolean("sentinel_is_charging")) {
|
&& !stack.getOrCreateTag().getBoolean("sentinel_is_charging")) {
|
||||||
|
if (player.hasEffect(MobEffects.MOVEMENT_SPEED)) {
|
||||||
|
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.sentinel.run_fast"));
|
||||||
|
} else {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.sentinel.run"));
|
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.sentinel.run"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.sentinel.idle"));
|
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.sentinel.idle"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,6 +109,91 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"animation.sentinel.run_fast": {
|
||||||
|
"loop": true,
|
||||||
|
"animation_length": 0.7,
|
||||||
|
"bones": {
|
||||||
|
"0": {
|
||||||
|
"rotation": {
|
||||||
|
"0.0": {
|
||||||
|
"vector": [-65.32786, 12.14905, 0.43184]
|
||||||
|
},
|
||||||
|
"0.175": {
|
||||||
|
"vector": [-65.21083, 16.27391, 6.66077],
|
||||||
|
"easing": "easeInSine"
|
||||||
|
},
|
||||||
|
"0.35": {
|
||||||
|
"vector": [-68.74727, 14.25203, 5.74607],
|
||||||
|
"easing": "easeOutSine"
|
||||||
|
},
|
||||||
|
"0.525": {
|
||||||
|
"vector": [-70.53091, 9.93418, -3.00092],
|
||||||
|
"easing": "easeInSine"
|
||||||
|
},
|
||||||
|
"0.7": {
|
||||||
|
"vector": [-65.32786, 12.14905, 0.43184]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"0.0": {
|
||||||
|
"vector": [-4.52807, 0.28395, 1.288],
|
||||||
|
"easing": "easeOutSine"
|
||||||
|
},
|
||||||
|
"0.175": {
|
||||||
|
"vector": [-5.57571, 2.65883, 1.2116],
|
||||||
|
"easing": "easeInSine"
|
||||||
|
},
|
||||||
|
"0.35": {
|
||||||
|
"vector": [-7.57844, 0.1221, -0.22187],
|
||||||
|
"easing": "easeOutSine"
|
||||||
|
},
|
||||||
|
"0.525": {
|
||||||
|
"vector": [-5.75027, 2.85577, 1.23384],
|
||||||
|
"easing": "easeInSine"
|
||||||
|
},
|
||||||
|
"0.7": {
|
||||||
|
"vector": [-4.52807, 0.28395, 1.288],
|
||||||
|
"easing": "easeOutSine"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Lefthand": {
|
||||||
|
"rotation": {
|
||||||
|
"vector": [-1.41476, -16.33468, -1.66483]
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"vector": [6, -13, 49]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Righthand": {
|
||||||
|
"rotation": {
|
||||||
|
"vector": [0.91131, 14.09621, -8.80599]
|
||||||
|
},
|
||||||
|
"position": {
|
||||||
|
"vector": [2.87519, -0.6965, 0.78255]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"camera": {
|
||||||
|
"rotation": {
|
||||||
|
"0.0": {
|
||||||
|
"vector": [-0.3, -0.3, 0.3]
|
||||||
|
},
|
||||||
|
"0.175": {
|
||||||
|
"vector": [0.3, 0, -0.3]
|
||||||
|
},
|
||||||
|
"0.35": {
|
||||||
|
"vector": [-0.3, 0.3, 0.3]
|
||||||
|
},
|
||||||
|
"0.525": {
|
||||||
|
"vector": [0.3, 0, -0.3]
|
||||||
|
},
|
||||||
|
"0.7": {
|
||||||
|
"vector": [-0.3, -0.3, 0.3]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"animation.sentinel.fire": {
|
"animation.sentinel.fire": {
|
||||||
"animation_length": 0.01,
|
"animation_length": 0.01,
|
||||||
"bones": {
|
"bones": {
|
||||||
|
|
|
@ -42,10 +42,10 @@
|
||||||
{
|
{
|
||||||
"name": "flare",
|
"name": "flare",
|
||||||
"parent": "0",
|
"parent": "0",
|
||||||
"pivot": [0, 0.33125, 0.5],
|
"pivot": [0, 0.58125, 0.5],
|
||||||
"cubes": [
|
"cubes": [
|
||||||
{
|
{
|
||||||
"origin": [-2.5, -0.46875, -17.1],
|
"origin": [-2.5, -0.21875, -17.1],
|
||||||
"size": [6, 5.11328, 0],
|
"size": [6, 5.11328, 0],
|
||||||
"uv": {
|
"uv": {
|
||||||
"north": {"uv": [124.75, 46.375], "uv_size": [-3.25, 3.375]},
|
"north": {"uv": [124.75, 46.375], "uv_size": [-3.25, 3.375]},
|
||||||
|
|
Loading…
Add table
Reference in a new issue