修复木仓口火焰显示问题
This commit is contained in:
parent
d31a5a810f
commit
663baa7900
19 changed files with 101 additions and 172 deletions
|
@ -55,13 +55,8 @@ public class AK47ItemModel extends GeoModel<AK47Item> {
|
||||||
|
|
||||||
CoreGeoBone holo = getAnimationProcessor().getBone("holo");
|
CoreGeoBone holo = getAnimationProcessor().getBone("holo");
|
||||||
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
||||||
if (gun.getPosX() > 1.8) {
|
|
||||||
holo.setScaleX(1);
|
holo.setHidden(!(gun.getPosX() > 1.8));
|
||||||
holo.setScaleY(1);
|
|
||||||
} else {
|
|
||||||
holo.setScaleX(0);
|
|
||||||
holo.setScaleY(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
double fp = player.getPersistentData().getDouble("fire_pos");
|
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||||
|
@ -83,13 +78,12 @@ public class AK47ItemModel extends GeoModel<AK47Item> {
|
||||||
shuan.setPosZ(2.4f * (float) fp);
|
shuan.setPosZ(2.4f * (float) fp);
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setScaleX((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setHidden(false);
|
||||||
flare.setScaleY((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
||||||
|
flare.setScaleY((float) (1 + 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.setScaleX(0);
|
flare.setHidden(true);
|
||||||
flare.setScaleY(0);
|
|
||||||
flare.setRotZ(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
||||||
|
|
|
@ -68,13 +68,12 @@ public class Aa12ItemModel extends GeoModel<Aa12Item> {
|
||||||
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setScaleX((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setHidden(false);
|
||||||
flare.setScaleY((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
||||||
|
flare.setScaleY((float) (1 + 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.setScaleX(0);
|
flare.setHidden(true);
|
||||||
flare.setScaleY(0);
|
|
||||||
flare.setRotZ(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
||||||
|
|
|
@ -66,13 +66,12 @@ public class AbekiriItemModel extends GeoModel<Abekiri> {
|
||||||
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setScaleX((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setHidden(false);
|
||||||
flare.setScaleY((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
||||||
|
flare.setScaleY((float) (1 + 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.setScaleX(0);
|
flare.setHidden(true);
|
||||||
flare.setScaleY(0);
|
|
||||||
flare.setRotZ(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
||||||
|
|
|
@ -93,13 +93,12 @@ public class DevotionItemModel extends GeoModel<Devotion> {
|
||||||
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).recoilHorizon * fp));
|
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).recoilHorizon * fp));
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setScaleX((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setHidden(false);
|
||||||
flare.setScaleY((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
||||||
|
flare.setScaleY((float) (1 + 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.setScaleX(0);
|
flare.setHidden(true);
|
||||||
flare.setScaleY(0);
|
|
||||||
flare.setRotZ(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -43,13 +43,12 @@ public class Hk416ItemModel extends GeoModel<Hk416Item> {
|
||||||
if (!stack.is(ModTags.Items.GUN)) return;
|
if (!stack.is(ModTags.Items.GUN)) return;
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setScaleX((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setHidden(false);
|
||||||
flare.setScaleY((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
||||||
|
flare.setScaleY((float) (1 + 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.setScaleX(0);
|
flare.setHidden(true);
|
||||||
flare.setScaleY(0);
|
|
||||||
flare.setRotZ(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double p = player.getPersistentData().getDouble("zoom_pos");
|
double p = player.getPersistentData().getDouble("zoom_pos");
|
||||||
|
@ -62,13 +61,7 @@ public class Hk416ItemModel extends GeoModel<Hk416Item> {
|
||||||
|
|
||||||
scope.setScaleZ(1f - (0.5f * (float) p));
|
scope.setScaleZ(1f - (0.5f * (float) p));
|
||||||
|
|
||||||
if (gun.getPosX() > 3.1) {
|
holo.setHidden(!(gun.getPosX() > 3.1));
|
||||||
holo.setScaleX(1);
|
|
||||||
holo.setScaleY(1);
|
|
||||||
} else {
|
|
||||||
holo.setScaleX(0);
|
|
||||||
holo.setScaleY(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
double fp = player.getPersistentData().getDouble("fire_pos");
|
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||||
|
|
|
@ -67,13 +67,12 @@ public class HuntingRifleItemModel extends GeoModel<HuntingRifle> {
|
||||||
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setScaleX((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setHidden(false);
|
||||||
flare.setScaleY((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
||||||
|
flare.setScaleY((float) (1 + 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.setScaleX(0);
|
flare.setHidden(true);
|
||||||
flare.setScaleY(0);
|
|
||||||
flare.setRotZ(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
||||||
|
|
|
@ -74,13 +74,12 @@ public class M4ItemModel extends GeoModel<M4Item> {
|
||||||
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setScaleX((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setHidden(false);
|
||||||
flare.setScaleY((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
||||||
|
flare.setScaleY((float) (1 + 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.setScaleX(0);
|
flare.setHidden(true);
|
||||||
flare.setScaleY(0);
|
|
||||||
flare.setRotZ(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
||||||
|
|
|
@ -117,13 +117,12 @@ public class M60ItemModel extends GeoModel<M60Item> {
|
||||||
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setScaleX((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setHidden(false);
|
||||||
flare.setScaleY((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
||||||
|
flare.setScaleY((float) (1 + 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.setScaleX(0);
|
flare.setHidden(true);
|
||||||
flare.setScaleY(0);
|
|
||||||
flare.setRotZ(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
||||||
|
|
|
@ -55,14 +55,13 @@ public class M79ItemModel extends GeoModel<M79Item> {
|
||||||
|
|
||||||
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setScaleX((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setHidden(false);
|
||||||
flare.setScaleY((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
||||||
|
flare.setScaleY((float) (1 + 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.setScaleX(0);
|
flare.setHidden(true);
|
||||||
flare.setScaleY(0);
|
|
||||||
flare.setRotZ(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double fp = player.getPersistentData().getDouble("fire_pos");
|
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||||
|
|
|
@ -33,7 +33,6 @@ public class M870ItemModel extends GeoModel<M870Item> {
|
||||||
public void setCustomAnimations(M870Item animatable, long instanceId, AnimationState animationState) {
|
public void setCustomAnimations(M870Item animatable, long instanceId, AnimationState animationState) {
|
||||||
CoreGeoBone gun = getAnimationProcessor().getBone("bone");
|
CoreGeoBone gun = getAnimationProcessor().getBone("bone");
|
||||||
CoreGeoBone shen = getAnimationProcessor().getBone("shen");
|
CoreGeoBone shen = getAnimationProcessor().getBone("shen");
|
||||||
CoreGeoBone shell = getAnimationProcessor().getBone("shell");
|
|
||||||
|
|
||||||
Player player = Minecraft.getInstance().player;
|
Player player = Minecraft.getInstance().player;
|
||||||
if (player == null) return;
|
if (player == null) return;
|
||||||
|
@ -72,13 +71,12 @@ public class M870ItemModel extends GeoModel<M870Item> {
|
||||||
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setScaleX((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setHidden(false);
|
||||||
flare.setScaleY((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
||||||
|
flare.setScaleY((float) (1 + 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.setScaleX(0);
|
flare.setHidden(true);
|
||||||
flare.setScaleY(0);
|
|
||||||
flare.setRotZ(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
||||||
|
|
|
@ -56,11 +56,8 @@ public class M98bItemModel extends GeoModel<M98bItem> {
|
||||||
}
|
}
|
||||||
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).recoilHorizon * fp));
|
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).recoilHorizon * fp));
|
||||||
|
|
||||||
double p = 0;
|
double p = player.getPersistentData().getDouble("zoom_pos");
|
||||||
p = player.getPersistentData().getDouble("zoom_pos");
|
double zp = player.getPersistentData().getDouble("zoom_pos_z");
|
||||||
|
|
||||||
double zp = 0;
|
|
||||||
zp = player.getPersistentData().getDouble("zoom_pos_z");
|
|
||||||
|
|
||||||
gun.setPosX(2.245f * (float) p);
|
gun.setPosX(2.245f * (float) p);
|
||||||
|
|
||||||
|
@ -74,25 +71,20 @@ public class M98bItemModel extends GeoModel<M98bItem> {
|
||||||
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
||||||
CoreGeoBone qiang = getAnimationProcessor().getBone("qiang");
|
CoreGeoBone qiang = getAnimationProcessor().getBone("qiang");
|
||||||
if (gun.getPosX() > 1.9) {
|
if (gun.getPosX() > 1.9) {
|
||||||
holo.setScaleX(1);
|
holo.setHidden(false);
|
||||||
holo.setScaleY(1);
|
qiang.setHidden(true);
|
||||||
qiang.setScaleX(0);
|
|
||||||
qiang.setScaleY(0);
|
|
||||||
} else {
|
} else {
|
||||||
holo.setScaleX(0);
|
holo.setHidden(true);
|
||||||
holo.setScaleY(0);
|
qiang.setHidden(false);
|
||||||
qiang.setScaleX(1);
|
|
||||||
qiang.setScaleY(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setScaleX((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setHidden(false);
|
||||||
flare.setScaleY((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
||||||
|
flare.setScaleY((float) (1 + 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.setScaleX(0);
|
flare.setHidden(true);
|
||||||
flare.setScaleY(0);
|
|
||||||
flare.setRotZ(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
||||||
|
@ -101,10 +93,8 @@ public class M98bItemModel extends GeoModel<M98bItem> {
|
||||||
float PosX = (float)player.getPersistentData().getDouble("gun_move_posX");
|
float PosX = (float)player.getPersistentData().getDouble("gun_move_posX");
|
||||||
float PosY = (float)player.getPersistentData().getDouble("gun_move_posY");
|
float PosY = (float)player.getPersistentData().getDouble("gun_move_posY");
|
||||||
|
|
||||||
double y = 0;
|
double y = player.getPersistentData().getDouble("y");
|
||||||
double x = 0;
|
double x = player.getPersistentData().getDouble("x");
|
||||||
y = player.getPersistentData().getDouble("y");
|
|
||||||
x = player.getPersistentData().getDouble("x");
|
|
||||||
|
|
||||||
root.setPosX(PosX);
|
root.setPosX(PosX);
|
||||||
|
|
||||||
|
|
|
@ -72,13 +72,12 @@ public class MarlinItemModel extends GeoModel<MarlinItem> {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setScaleX((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setHidden(false);
|
||||||
flare.setScaleY((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
||||||
|
flare.setScaleY((float) (1 + 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.setScaleX(0);
|
flare.setHidden(true);
|
||||||
flare.setScaleY(0);
|
|
||||||
flare.setRotZ(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
||||||
|
|
|
@ -114,13 +114,12 @@ public class Mk14ItemModel extends GeoModel<Mk14Item> {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setScaleX((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setHidden(false);
|
||||||
flare.setScaleY((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
||||||
|
flare.setScaleY((float) (1 + 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.setScaleX(0);
|
flare.setHidden(true);
|
||||||
flare.setScaleY(0);
|
|
||||||
flare.setRotZ(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
||||||
|
|
|
@ -100,13 +100,12 @@ public class Ntw20Model extends GeoModel<Ntw20> {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setScaleX((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setHidden(false);
|
||||||
flare.setScaleY((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
||||||
|
flare.setScaleY((float) (1 + 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.setScaleX(0);
|
flare.setHidden(true);
|
||||||
flare.setScaleY(0);
|
|
||||||
flare.setRotZ(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
||||||
|
|
|
@ -70,21 +70,11 @@ public class RpkItemModel extends GeoModel<RpkItem> {
|
||||||
|
|
||||||
|
|
||||||
CoreGeoBone holo = getAnimationProcessor().getBone("holo");
|
CoreGeoBone holo = getAnimationProcessor().getBone("holo");
|
||||||
if (gun.getPosX() > 1.65f) {
|
|
||||||
holo.setScaleX(0.9f);
|
holo.setScaleX(0.9f);
|
||||||
holo.setScaleY(0.9f);
|
holo.setScaleY(0.9f);
|
||||||
hide.setScaleX(0);
|
|
||||||
hide.setScaleY(0);
|
|
||||||
hide.setScaleZ(0);
|
|
||||||
|
|
||||||
} else {
|
holo.setHidden(!(gun.getPosX() > 1.65));
|
||||||
holo.setScaleX(0);
|
|
||||||
holo.setScaleY(0);
|
|
||||||
hide.setScaleX(1);
|
|
||||||
hide.setScaleY(1);
|
|
||||||
hide.setScaleZ(1);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
double fp = player.getPersistentData().getDouble("fire_pos");
|
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||||
|
@ -105,13 +95,12 @@ public class RpkItemModel extends GeoModel<RpkItem> {
|
||||||
shuan.setPosZ(2.4f * (float) fp);
|
shuan.setPosZ(2.4f * (float) fp);
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setScaleX((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setHidden(false);
|
||||||
flare.setScaleY((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
||||||
|
flare.setScaleY((float) (1 + 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.setScaleX(0);
|
flare.setHidden(true);
|
||||||
flare.setScaleY(0);
|
|
||||||
flare.setRotZ(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
||||||
|
|
|
@ -70,14 +70,8 @@ public class SentinelItemModel extends GeoModel<SentinelItem> {
|
||||||
cb.setRotZ(cb.getRotZ() + times * 0.03f * (float) (stack.getOrCreateTag().getDouble("chamber_rot")));
|
cb.setRotZ(cb.getRotZ() + times * 0.03f * (float) (stack.getOrCreateTag().getDouble("chamber_rot")));
|
||||||
|
|
||||||
CoreGeoBone holo = getAnimationProcessor().getBone("holo");
|
CoreGeoBone holo = getAnimationProcessor().getBone("holo");
|
||||||
if (gun.getPosX() > 1.8) {
|
|
||||||
holo.setPosY(0.09f);
|
holo.setPosY(0.09f);
|
||||||
holo.setScaleX(1);
|
holo.setHidden(!(gun.getPosX() > 1.8));
|
||||||
holo.setScaleY(1);
|
|
||||||
} else {
|
|
||||||
holo.setScaleX(0);
|
|
||||||
holo.setScaleY(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
double fp = player.getPersistentData().getDouble("fire_pos");
|
double fp = player.getPersistentData().getDouble("fire_pos");
|
||||||
double fr = player.getPersistentData().getDouble("fire_rot");
|
double fr = player.getPersistentData().getDouble("fire_rot");
|
||||||
|
@ -104,13 +98,7 @@ public class SentinelItemModel extends GeoModel<SentinelItem> {
|
||||||
iEnergyStorage -> flag.set(iEnergyStorage.getEnergyStored() > 0)
|
iEnergyStorage -> flag.set(iEnergyStorage.getEnergyStored() > 0)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (flag.get()) {
|
charge.setHidden(!flag.get());
|
||||||
charge.setScaleX(1);
|
|
||||||
charge.setScaleY(1);
|
|
||||||
} else {
|
|
||||||
charge.setScaleX(0);
|
|
||||||
charge.setScaleY(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
||||||
|
|
||||||
|
@ -157,13 +145,12 @@ public class SentinelItemModel extends GeoModel<SentinelItem> {
|
||||||
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setScaleX((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setHidden(false);
|
||||||
flare.setScaleY((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
||||||
|
flare.setScaleY((float) (1 + 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.setScaleX(0);
|
flare.setHidden(true);
|
||||||
flare.setScaleY(0);
|
|
||||||
flare.setRotZ(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((stack.getOrCreateTag().getDouble("ammo") <= 5)) {
|
if ((stack.getOrCreateTag().getDouble("ammo") <= 5)) {
|
||||||
|
|
|
@ -61,13 +61,8 @@ public class SksItemModel extends GeoModel<SksItem> {
|
||||||
gun.setRotZ((float) (0.05f * zp));
|
gun.setRotZ((float) (0.05f * zp));
|
||||||
|
|
||||||
CoreGeoBone holo = getAnimationProcessor().getBone("holo");
|
CoreGeoBone holo = getAnimationProcessor().getBone("holo");
|
||||||
if (gun.getPosX() > 1.2) {
|
|
||||||
holo.setScaleX(1);
|
holo.setHidden(!(gun.getPosX() > 1.2));
|
||||||
holo.setScaleY(1);
|
|
||||||
} else {
|
|
||||||
holo.setScaleX(0);
|
|
||||||
holo.setScaleY(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
CoreGeoBone shen = getAnimationProcessor().getBone("shen");
|
CoreGeoBone shen = getAnimationProcessor().getBone("shen");
|
||||||
|
|
||||||
|
@ -90,13 +85,12 @@ public class SksItemModel extends GeoModel<SksItem> {
|
||||||
shuan.setPosZ(2f * (float) fp);
|
shuan.setPosZ(2f * (float) fp);
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setScaleX((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setHidden(false);
|
||||||
flare.setScaleY((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
||||||
|
flare.setScaleY((float) (1 + 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.setScaleX(0);
|
flare.setHidden(true);
|
||||||
flare.setScaleY(0);
|
|
||||||
flare.setRotZ(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
||||||
|
|
|
@ -77,16 +77,12 @@ public class SvdItemModel extends GeoModel<SvdItem> {
|
||||||
holo.setPosY(0.05f);
|
holo.setPosY(0.05f);
|
||||||
holo.setScaleX(0.45f);
|
holo.setScaleX(0.45f);
|
||||||
holo.setScaleY(0.45f);
|
holo.setScaleY(0.45f);
|
||||||
sight.setScaleX(0f);
|
holo.setHidden(false);
|
||||||
sight.setScaleY(0f);
|
sight.setHidden(true);
|
||||||
} else {
|
} else {
|
||||||
holo.setPosY(0);
|
holo.setHidden(true);
|
||||||
holo.setScaleX(0);
|
sight.setHidden(false);
|
||||||
holo.setScaleY(0);
|
glass.setHidden(true);
|
||||||
sight.setScaleX(1f);
|
|
||||||
sight.setScaleY(1f);
|
|
||||||
glass.setScaleX(0);
|
|
||||||
glass.setScaleY(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreGeoBone shen = getAnimationProcessor().getBone("shen");
|
CoreGeoBone shen = getAnimationProcessor().getBone("shen");
|
||||||
|
@ -112,13 +108,12 @@ public class SvdItemModel extends GeoModel<SvdItem> {
|
||||||
holo.setRotZ(-0.04f * (float) fp);
|
holo.setRotZ(-0.04f * (float) fp);
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setScaleX((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setHidden(false);
|
||||||
flare.setScaleY((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
||||||
|
flare.setScaleY((float) (1 + 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.setScaleX(0);
|
flare.setHidden(true);
|
||||||
flare.setScaleY(0);
|
|
||||||
flare.setRotZ(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
||||||
|
|
|
@ -67,13 +67,12 @@ public class TracheliumItemModel extends GeoModel<Trachelium> {
|
||||||
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
CoreGeoBone flare = getAnimationProcessor().getBone("flare");
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
if (stack.getOrCreateTag().getDouble("flash_time") > 0) {
|
||||||
flare.setScaleX((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setHidden(false);
|
||||||
flare.setScaleY((float) (1.0 + 0.5 * (Math.random() - 0.5)));
|
flare.setScaleX((float) (1 + 0.5 * (Math.random() - 0.5)));
|
||||||
|
flare.setScaleY((float) (1 + 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.setScaleX(0);
|
flare.setHidden(true);
|
||||||
flare.setScaleY(0);
|
|
||||||
flare.setRotZ(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
CoreGeoBone root = getAnimationProcessor().getBone("root");
|
||||||
|
|
Loading…
Add table
Reference in a new issue