添加亡命之徒贴图,清理无用代码
This commit is contained in:
parent
bf13ce8c7a
commit
963412b8d5
39 changed files with 800 additions and 1334 deletions
|
@ -12,6 +12,7 @@ import net.minecraft.world.effect.MobEffectInstance;
|
|||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.monster.Creeper;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.projectile.AbstractArrow;
|
||||
import net.minecraft.world.entity.projectile.ItemSupplier;
|
||||
|
@ -90,9 +91,13 @@ public class TaserBulletProjectileEntity extends AbstractArrow implements ItemSu
|
|||
return;
|
||||
}
|
||||
if (!living.level().isClientSide()) {
|
||||
if (living.getClass() == Creeper.class) {
|
||||
//TODO 命中苦力怕时转化为闪电苦力怕
|
||||
} else {
|
||||
living.addEffect(new MobEffectInstance(ModMobEffects.SHOCK.get(), 100 + volt * 30, volt), this.getOwner());
|
||||
}
|
||||
}
|
||||
}
|
||||
this.discard();
|
||||
}
|
||||
|
||||
|
|
|
@ -491,7 +491,12 @@ public class ClientEventHandler {
|
|||
float times = 5 * Minecraft.getInstance().getDeltaFrameTime();
|
||||
double speed = stack.getOrCreateTag().getDouble("zoom_speed");
|
||||
if (GLFW.glfwGetMouseButton(Minecraft.getInstance().getWindow().getWindow(), GLFW.GLFW_MOUSE_BUTTON_RIGHT) == GLFW.GLFW_PRESS && !notInGame() && drawTime < 0.01) {
|
||||
if (Minecraft.getInstance().player != null) {
|
||||
Minecraft.getInstance().player.getPersistentData().putDouble("noRun", 5);
|
||||
}
|
||||
if (cantFireTime <= 10) {
|
||||
zoomTime = Mth.clamp(zoomTime + 0.03 * speed * times, 0, 1);
|
||||
}
|
||||
} else {
|
||||
zoomTime = Mth.clamp(zoomTime - 0.04 * speed * times, 0, 1);
|
||||
}
|
||||
|
|
|
@ -46,7 +46,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class Glock17Item extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
public Glock17Item() {
|
||||
|
@ -81,7 +80,6 @@ public class Glock17Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.glock.fire"));
|
||||
}
|
||||
|
@ -97,8 +95,6 @@ public class Glock17Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.glock.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState idlePredicate(AnimationState<Glock17Item> event) {
|
||||
LocalPlayer player = Minecraft.getInstance().player;
|
||||
|
@ -106,8 +102,6 @@ public class Glock17Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (player.isSprinting() && player.onGround()
|
||||
&& player.getPersistentData().getDouble("noRun") == 0
|
||||
&& !(stack.getOrCreateTag().getBoolean("is_normal_reloading") || stack.getOrCreateTag().getBoolean("is_empty_reloading")) && ClientEventHandler.drawTime < 0.01) {
|
||||
|
@ -120,8 +114,6 @@ public class Glock17Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.glock.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
|
@ -162,7 +154,6 @@ public class Glock17Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -6,6 +6,7 @@ import net.mcreator.superbwarfare.ModUtils;
|
|||
import net.mcreator.superbwarfare.client.renderer.item.Glock18ItemRenderer;
|
||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||
import net.mcreator.superbwarfare.init.ModItems;
|
||||
import net.mcreator.superbwarfare.init.ModPerks;
|
||||
import net.mcreator.superbwarfare.init.ModSounds;
|
||||
import net.mcreator.superbwarfare.init.ModTags;
|
||||
import net.mcreator.superbwarfare.item.AnimatedItem;
|
||||
|
@ -46,7 +47,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class Glock18Item extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
public Glock18Item() {
|
||||
|
@ -81,7 +81,6 @@ public class Glock18Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.glock.fire"));
|
||||
}
|
||||
|
@ -96,8 +95,6 @@ public class Glock18Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.glock.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState idlePredicate(AnimationState<Glock18Item> event) {
|
||||
LocalPlayer player = Minecraft.getInstance().player;
|
||||
|
@ -105,8 +102,6 @@ public class Glock18Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (player.isSprinting() && player.onGround()
|
||||
&& player.getPersistentData().getDouble("noRun") == 0
|
||||
&& !(stack.getOrCreateTag().getBoolean("is_normal_reloading") || stack.getOrCreateTag().getBoolean("is_empty_reloading")) && ClientEventHandler.drawTime < 0.01) {
|
||||
|
@ -119,8 +114,6 @@ public class Glock18Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.glock.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
|
@ -164,7 +157,6 @@ public class Glock18Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -179,6 +171,6 @@ public class Glock18Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public boolean canApplyPerk(Perk perk) {
|
||||
return PerkHelper.HANDGUN_PERKS.test(perk) || PerkHelper.MAGAZINE_PERKS.test(perk);
|
||||
return PerkHelper.HANDGUN_PERKS.test(perk) || PerkHelper.MAGAZINE_PERKS.test(perk) || perk == ModPerks.DESPERADO.get();
|
||||
}
|
||||
}
|
|
@ -46,7 +46,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class M1911Item extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
public M1911Item() {
|
||||
|
@ -81,7 +80,6 @@ public class M1911Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.glock.fire"));
|
||||
}
|
||||
|
@ -96,8 +94,6 @@ public class M1911Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.glock.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState idlePredicate(AnimationState<M1911Item> event) {
|
||||
LocalPlayer player = Minecraft.getInstance().player;
|
||||
|
@ -105,8 +101,6 @@ public class M1911Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (player.isSprinting() && player.onGround()
|
||||
&& player.getPersistentData().getDouble("noRun") == 0
|
||||
&& !(stack.getOrCreateTag().getBoolean("is_normal_reloading") || stack.getOrCreateTag().getBoolean("is_empty_reloading")) && ClientEventHandler.drawTime < 0.01) {
|
||||
|
@ -119,8 +113,6 @@ public class M1911Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.glock.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
|
@ -164,7 +156,6 @@ public class M1911Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -51,7 +51,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class Trachelium extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
public Trachelium() {
|
||||
|
@ -91,8 +90,6 @@ public class Trachelium extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 1) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.trachelium.fire"));
|
||||
}
|
||||
|
@ -111,26 +108,9 @@ public class Trachelium extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.trachelium.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState procedurePredicate(AnimationState<Trachelium> event) {
|
||||
if (transformType != null && transformType.firstPerson()) {
|
||||
if (!(this.animationProcedure.equals("empty")) && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
this.animationProcedure = "empty";
|
||||
event.getController().forceAnimationReset();
|
||||
}
|
||||
}
|
||||
}
|
||||
return PlayState.CONTINUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
AnimationController<Trachelium> procedureController = new AnimationController<>(this, "procedureController", 0, this::procedurePredicate);
|
||||
data.add(procedureController);
|
||||
AnimationController<Trachelium> idleController = new AnimationController<>(this, "idleController", 3, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
@ -172,7 +152,6 @@ public class Trachelium extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -52,7 +52,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class JavelinItem extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
public JavelinItem() {
|
||||
|
@ -87,7 +86,6 @@ public class JavelinItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
var tag = stack.getOrCreateTag();
|
||||
|
||||
if (tag.getInt("fire_animation") > 0) {
|
||||
|
@ -108,28 +106,9 @@ public class JavelinItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.javelin.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState procedurePredicate(AnimationState<JavelinItem> event) {
|
||||
if (transformType != null && transformType.firstPerson()) {
|
||||
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
this.animationProcedure = "empty";
|
||||
event.getController().forceAnimationReset();
|
||||
}
|
||||
} else if (this.animationProcedure.equals("empty")) {
|
||||
return PlayState.STOP;
|
||||
}
|
||||
}
|
||||
return PlayState.CONTINUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
var procedureController = new AnimationController<>(this, "procedureController", 0, this::procedurePredicate);
|
||||
data.add(procedureController);
|
||||
var idleController = new AnimationController<>(this, "idleController", 4, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
@ -220,7 +199,6 @@ public class JavelinItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -50,7 +50,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class M79Item extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
@Override
|
||||
|
@ -90,8 +89,6 @@ public class M79Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m79.fire"));
|
||||
}
|
||||
|
@ -110,35 +107,18 @@ public class M79Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m79.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState procedurePredicate(AnimationState<M79Item> event) {
|
||||
if (transformType != null && transformType.firstPerson()) {
|
||||
if (!(this.animationProcedure.equals("empty")) && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
this.animationProcedure = "empty";
|
||||
event.getController().forceAnimationReset();
|
||||
}
|
||||
}
|
||||
}
|
||||
return PlayState.CONTINUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
var procedureController = new AnimationController<>(this, "procedureController", 0, this::procedurePredicate);
|
||||
data.add(procedureController);
|
||||
var idleController = new AnimationController<>(this, "idleController", 4, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AnimatableInstanceCache getAnimatableInstanceCache() {
|
||||
return this.cache;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
var idleController = new AnimationController<>(this, "idleController", 3, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlot slot, ItemStack stack) {
|
||||
Multimap<Attribute, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
|
||||
|
@ -192,7 +172,6 @@ public class M79Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -50,7 +50,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class RpgItem extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
public RpgItem() {
|
||||
|
@ -85,7 +84,6 @@ public class RpgItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
var tag = stack.getOrCreateTag();
|
||||
|
||||
if (tag.getInt("fire_animation") > 0) {
|
||||
|
@ -106,28 +104,9 @@ public class RpgItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.rpg.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState procedurePredicate(AnimationState<RpgItem> event) {
|
||||
if (transformType != null && transformType.firstPerson()) {
|
||||
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
this.animationProcedure = "empty";
|
||||
event.getController().forceAnimationReset();
|
||||
}
|
||||
} else if (this.animationProcedure.equals("empty")) {
|
||||
return PlayState.STOP;
|
||||
}
|
||||
}
|
||||
return PlayState.CONTINUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
var procedureController = new AnimationController<>(this, "procedureController", 0, this::procedurePredicate);
|
||||
data.add(procedureController);
|
||||
var idleController = new AnimationController<>(this, "idleController", 4, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
@ -198,7 +177,6 @@ public class RpgItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -6,6 +6,7 @@ import net.mcreator.superbwarfare.ModUtils;
|
|||
import net.mcreator.superbwarfare.client.renderer.item.DevotionItemRenderer;
|
||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||
import net.mcreator.superbwarfare.init.ModItems;
|
||||
import net.mcreator.superbwarfare.init.ModPerks;
|
||||
import net.mcreator.superbwarfare.init.ModSounds;
|
||||
import net.mcreator.superbwarfare.init.ModTags;
|
||||
import net.mcreator.superbwarfare.item.AnimatedItem;
|
||||
|
@ -47,7 +48,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class DevotionItem extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
public DevotionItem() {
|
||||
|
@ -82,12 +82,6 @@ public class DevotionItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.devotion.fire"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getBoolean("is_empty_reloading")) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.devotion.reload_empty"));
|
||||
}
|
||||
|
@ -106,27 +100,10 @@ public class DevotionItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.devotion.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState procedurePredicate(AnimationState<DevotionItem> event) {
|
||||
if (transformType != null && transformType.firstPerson()) {
|
||||
if (!(this.animationProcedure.equals("empty")) && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
this.animationProcedure = "empty";
|
||||
event.getController().forceAnimationReset();
|
||||
}
|
||||
}
|
||||
}
|
||||
return PlayState.CONTINUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
var procedureController = new AnimationController<>(this, "procedureController", 0, this::procedurePredicate);
|
||||
data.add(procedureController);
|
||||
var idleController = new AnimationController<>(this, "idleController", 4, this::idlePredicate);
|
||||
var idleController = new AnimationController<>(this, "idleController", 3, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
||||
|
@ -160,7 +137,6 @@ public class DevotionItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -175,6 +151,6 @@ public class DevotionItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public boolean canApplyPerk(Perk perk) {
|
||||
return PerkHelper.MACHINE_GUN_PERKS.test(perk) || PerkHelper.MAGAZINE_PERKS.test(perk);
|
||||
return PerkHelper.MACHINE_GUN_PERKS.test(perk) || PerkHelper.MAGAZINE_PERKS.test(perk) || perk == ModPerks.DESPERADO.get();
|
||||
}
|
||||
}
|
|
@ -6,6 +6,7 @@ import net.mcreator.superbwarfare.ModUtils;
|
|||
import net.mcreator.superbwarfare.client.renderer.item.M60ItemRenderer;
|
||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||
import net.mcreator.superbwarfare.init.ModItems;
|
||||
import net.mcreator.superbwarfare.init.ModPerks;
|
||||
import net.mcreator.superbwarfare.init.ModSounds;
|
||||
import net.mcreator.superbwarfare.init.ModTags;
|
||||
import net.mcreator.superbwarfare.item.AnimatedItem;
|
||||
|
@ -47,7 +48,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class M60Item extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
public M60Item() {
|
||||
|
@ -76,21 +76,26 @@ public class M60Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
transformType = type;
|
||||
}
|
||||
|
||||
private PlayState fireAnimPredicate(AnimationState<M60Item> event) {
|
||||
LocalPlayer player = Minecraft.getInstance().player;
|
||||
if (player == null) return PlayState.STOP;
|
||||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m60.fire"));
|
||||
}
|
||||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m60.idle"));
|
||||
}
|
||||
|
||||
private PlayState idlePredicate(AnimationState<M60Item> event) {
|
||||
LocalPlayer player = Minecraft.getInstance().player;
|
||||
if (player == null) return PlayState.STOP;
|
||||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m60.fire"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m60.fire2"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getBoolean("is_empty_reloading")) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m60.reload"));
|
||||
|
@ -110,28 +115,11 @@ public class M60Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m60.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState procedurePredicate(AnimationState<M60Item> event) {
|
||||
if (transformType != null && transformType.firstPerson()) {
|
||||
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
this.animationProcedure = "empty";
|
||||
event.getController().forceAnimationReset();
|
||||
}
|
||||
} else if (this.animationProcedure.equals("empty")) {
|
||||
return PlayState.STOP;
|
||||
}
|
||||
}
|
||||
return PlayState.CONTINUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
var procedureController = new AnimationController<>(this, "procedureController", 0, this::procedurePredicate);
|
||||
data.add(procedureController);
|
||||
var fireAnimController = new AnimationController<>(this, "fireAnimController", 0, this::fireAnimPredicate);
|
||||
data.add(fireAnimController);
|
||||
var idleController = new AnimationController<>(this, "idleController", 4, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
@ -166,7 +154,6 @@ public class M60Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -181,6 +168,6 @@ public class M60Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public boolean canApplyPerk(Perk perk) {
|
||||
return PerkHelper.MACHINE_GUN_PERKS.test(perk) || PerkHelper.MAGAZINE_PERKS.test(perk);
|
||||
return PerkHelper.MACHINE_GUN_PERKS.test(perk) || PerkHelper.MAGAZINE_PERKS.test(perk) || perk == ModPerks.DESPERADO.get();
|
||||
}
|
||||
}
|
|
@ -55,7 +55,6 @@ import java.util.function.Consumer;
|
|||
public class MinigunItem extends GunItem implements GeoItem, AnimatedItem {
|
||||
private static final String TAG_HEAT = "heat";
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
public MinigunItem() {
|
||||
|
@ -120,8 +119,6 @@ public class MinigunItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (player.isSprinting() && player.onGround() && player.getPersistentData().getDouble("noRun") == 0 && ClientEventHandler.drawTime < 0.01) {
|
||||
if (player.hasEffect(MobEffects.MOVEMENT_SPEED)) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.minigun.run_fast"));
|
||||
|
@ -131,8 +128,6 @@ public class MinigunItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
}
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.minigun.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
|
@ -216,7 +211,6 @@ public class MinigunItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -233,7 +227,7 @@ public class MinigunItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
public boolean canApplyPerk(Perk perk) {
|
||||
return switch (perk.type) {
|
||||
case AMMO -> true;
|
||||
case FUNCTIONAL -> false;
|
||||
case FUNCTIONAL -> perk == ModPerks.FIELD_DOCTOR.get();
|
||||
case DAMAGE -> perk == ModPerks.MONSTER_HUNTER.get() || perk == ModPerks.KILLING_TALLY.get();
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import net.mcreator.superbwarfare.ModUtils;
|
|||
import net.mcreator.superbwarfare.client.renderer.item.RpkItemRenderer;
|
||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||
import net.mcreator.superbwarfare.init.ModItems;
|
||||
import net.mcreator.superbwarfare.init.ModPerks;
|
||||
import net.mcreator.superbwarfare.init.ModSounds;
|
||||
import net.mcreator.superbwarfare.init.ModTags;
|
||||
import net.mcreator.superbwarfare.item.AnimatedItem;
|
||||
|
@ -82,12 +83,6 @@ public class RpkItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak47.fire"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getBoolean("is_empty_reloading")) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak47.reload_empty"));
|
||||
}
|
||||
|
@ -106,28 +101,9 @@ public class RpkItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak47.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState procedurePredicate(AnimationState<RpkItem> event) {
|
||||
if (transformType != null && transformType.firstPerson()) {
|
||||
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
this.animationProcedure = "empty";
|
||||
event.getController().forceAnimationReset();
|
||||
}
|
||||
} else if (this.animationProcedure.equals("empty")) {
|
||||
return PlayState.STOP;
|
||||
}
|
||||
}
|
||||
return PlayState.CONTINUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
var procedureController = new AnimationController<>(this, "procedureController", 0, this::procedurePredicate);
|
||||
data.add(procedureController);
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {;
|
||||
var idleController = new AnimationController<>(this, "idleController", 4, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
@ -162,7 +138,6 @@ public class RpkItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -177,6 +152,6 @@ public class RpkItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public boolean canApplyPerk(Perk perk) {
|
||||
return PerkHelper.MACHINE_GUN_PERKS.test(perk) || PerkHelper.MAGAZINE_PERKS.test(perk);
|
||||
return PerkHelper.MACHINE_GUN_PERKS.test(perk) || PerkHelper.MAGAZINE_PERKS.test(perk) || perk == ModPerks.DESPERADO.get();
|
||||
}
|
||||
}
|
|
@ -46,7 +46,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class AK12Item extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
@Override
|
||||
|
@ -86,12 +85,6 @@ public class AK12Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak12.fire"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getBoolean("is_empty_reloading")) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak12.reload_empty"));
|
||||
}
|
||||
|
@ -110,12 +103,10 @@ public class AK12Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak12.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
var idleController = new AnimationController<>(this, "idleController", 4, this::idlePredicate);
|
||||
var idleController = new AnimationController<>(this, "idleController", 3, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
||||
|
@ -144,7 +135,6 @@ public class AK12Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -47,7 +47,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class AK47Item extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
@Override
|
||||
|
@ -87,12 +86,6 @@ public class AK47Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak47.fire"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getBoolean("is_empty_reloading")) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ak47.reload_empty"));
|
||||
}
|
||||
|
@ -111,12 +104,10 @@ public class AK47Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak47.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
var idleController = new AnimationController<>(this, "idleController", 4, this::idlePredicate);
|
||||
var idleController = new AnimationController<>(this, "idleController", 3, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
||||
|
@ -145,7 +136,6 @@ public class AK47Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -47,7 +47,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class Hk416Item extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
public Hk416Item() {
|
||||
|
@ -82,12 +81,6 @@ public class Hk416Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m4.fire"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getBoolean("is_empty_reloading")) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m4.reload_empty"));
|
||||
}
|
||||
|
@ -106,29 +99,10 @@ public class Hk416Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m4.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState procedurePredicate(AnimationState<Hk416Item> event) {
|
||||
if (transformType != null && transformType.firstPerson()) {
|
||||
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
this.animationProcedure = "empty";
|
||||
event.getController().forceAnimationReset();
|
||||
}
|
||||
} else if (this.animationProcedure.equals("empty")) {
|
||||
return PlayState.STOP;
|
||||
}
|
||||
}
|
||||
return PlayState.CONTINUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
var procedureController = new AnimationController<>(this, "procedureController", 0, this::procedurePredicate);
|
||||
data.add(procedureController);
|
||||
var idleController = new AnimationController<>(this, "idleController", 4, this::idlePredicate);
|
||||
var idleController = new AnimationController<>(this, "idleController", 3, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
||||
|
@ -162,7 +136,6 @@ public class Hk416Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -47,7 +47,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class M4Item extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
public M4Item() {
|
||||
|
@ -82,12 +81,6 @@ public class M4Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m4.fire"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getBoolean("is_empty_reloading")) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m4.reload_empty"));
|
||||
}
|
||||
|
@ -106,28 +99,9 @@ public class M4Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m4.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState procedurePredicate(AnimationState<M4Item> event) {
|
||||
if (transformType != null && transformType.firstPerson()) {
|
||||
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
this.animationProcedure = "empty";
|
||||
event.getController().forceAnimationReset();
|
||||
}
|
||||
} else if (this.animationProcedure.equals("empty")) {
|
||||
return PlayState.STOP;
|
||||
}
|
||||
}
|
||||
return PlayState.CONTINUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
var procedureController = new AnimationController<>(this, "procedureController", 0, this::procedurePredicate);
|
||||
data.add(procedureController);
|
||||
var idleController = new AnimationController<>(this, "idleController", 3, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
@ -162,7 +136,6 @@ public class M4Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -49,7 +49,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class MarlinItem extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
public MarlinItem() {
|
||||
|
@ -85,8 +84,6 @@ public class MarlinItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (transformType != null && transformType.firstPerson()) {
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (stack.getOrCreateTag().getInt("flash_time") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.marlin.fire"));
|
||||
}
|
||||
|
@ -130,29 +127,11 @@ public class MarlinItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
event.getController().setAnimation(RawAnimation.begin().thenLoop("animation.marlin.idle"));
|
||||
return PlayState.CONTINUE;
|
||||
}
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState procedurePredicate(AnimationState<MarlinItem> event) {
|
||||
if (transformType != null && transformType.firstPerson()) {
|
||||
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
this.animationProcedure = "empty";
|
||||
event.getController().forceAnimationReset();
|
||||
}
|
||||
} else if (this.animationProcedure.equals("empty")) {
|
||||
return PlayState.STOP;
|
||||
}
|
||||
}
|
||||
return PlayState.CONTINUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
var procedureController = new AnimationController<>(this, "procedureController", 0, this::procedurePredicate);
|
||||
data.add(procedureController);
|
||||
var idleController = new AnimationController<>(this, "idleController", 3, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
@ -196,7 +175,6 @@ public class MarlinItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -47,7 +47,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class Mk14Item extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
public Mk14Item() {
|
||||
|
@ -82,12 +81,6 @@ public class Mk14Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m14.fire"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getBoolean("is_empty_reloading")) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m14.reload_empty"));
|
||||
}
|
||||
|
@ -106,28 +99,9 @@ public class Mk14Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m14.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState procedurePredicate(AnimationState<Mk14Item> event) {
|
||||
if (transformType != null && transformType.firstPerson()) {
|
||||
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
this.animationProcedure = "empty";
|
||||
event.getController().forceAnimationReset();
|
||||
}
|
||||
} else if (this.animationProcedure.equals("empty")) {
|
||||
return PlayState.STOP;
|
||||
}
|
||||
}
|
||||
return PlayState.CONTINUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
var procedureController = new AnimationController<>(this, "procedureController", 0, this::procedurePredicate);
|
||||
data.add(procedureController);
|
||||
var idleController = new AnimationController<>(this, "idleController", 4, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
@ -162,7 +136,6 @@ public class Mk14Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -46,7 +46,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class Qbz95Item extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
public Qbz95Item() {
|
||||
|
@ -81,12 +80,6 @@ public class Qbz95Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.qbz95.fire"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getBoolean("is_empty_reloading")) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.qbz95.reload_empty"));
|
||||
}
|
||||
|
@ -105,28 +98,9 @@ public class Qbz95Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.qbz95.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState procedurePredicate(AnimationState<Qbz95Item> event) {
|
||||
if (transformType != null && transformType.firstPerson()) {
|
||||
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
this.animationProcedure = "empty";
|
||||
event.getController().forceAnimationReset();
|
||||
}
|
||||
} else if (this.animationProcedure.equals("empty")) {
|
||||
return PlayState.STOP;
|
||||
}
|
||||
}
|
||||
return PlayState.CONTINUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
var procedureController = new AnimationController<>(this, "procedureController", 0, this::procedurePredicate);
|
||||
data.add(procedureController);
|
||||
var idleController = new AnimationController<>(this, "idleController", 4, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
@ -161,7 +135,6 @@ public class Qbz95Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -47,7 +47,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class SksItem extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
@Override
|
||||
|
@ -87,12 +86,6 @@ public class SksItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.sks.fire"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getBoolean("is_empty_reloading")) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.sks.reload_empty"));
|
||||
}
|
||||
|
@ -111,28 +104,9 @@ public class SksItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.sks.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState procedurePredicate(AnimationState<SksItem> event) {
|
||||
if (transformType != null && transformType.firstPerson()) {
|
||||
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
this.animationProcedure = "empty";
|
||||
event.getController().forceAnimationReset();
|
||||
}
|
||||
} else if (this.animationProcedure.equals("empty")) {
|
||||
return PlayState.STOP;
|
||||
}
|
||||
}
|
||||
return PlayState.CONTINUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
var procedureController = new AnimationController<>(this, "procedureController", 0, this::procedurePredicate);
|
||||
data.add(procedureController);
|
||||
var idleController = new AnimationController<>(this, "idleController", 4, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
@ -162,7 +136,6 @@ public class SksItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -6,6 +6,7 @@ import net.mcreator.superbwarfare.ModUtils;
|
|||
import net.mcreator.superbwarfare.client.renderer.item.Aa12ItemRenderer;
|
||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||
import net.mcreator.superbwarfare.init.ModItems;
|
||||
import net.mcreator.superbwarfare.init.ModPerks;
|
||||
import net.mcreator.superbwarfare.init.ModSounds;
|
||||
import net.mcreator.superbwarfare.init.ModTags;
|
||||
import net.mcreator.superbwarfare.item.AnimatedItem;
|
||||
|
@ -188,6 +189,6 @@ public class Aa12Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public boolean canApplyPerk(Perk perk) {
|
||||
return PerkHelper.SHOTGUN_PERKS.test(perk) || PerkHelper.MAGAZINE_PERKS.test(perk);
|
||||
return PerkHelper.SHOTGUN_PERKS.test(perk) || PerkHelper.MAGAZINE_PERKS.test(perk) || perk == ModPerks.DESPERADO.get();
|
||||
}
|
||||
}
|
|
@ -49,7 +49,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class AbekiriItem extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
@Override
|
||||
|
@ -89,12 +88,6 @@ public class AbekiriItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ab.fire"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getBoolean("is_empty_reloading")) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ab.reload_empty"));
|
||||
}
|
||||
|
@ -113,27 +106,10 @@ public class AbekiriItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ab.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState procedurePredicate(AnimationState<AbekiriItem> event) {
|
||||
if (transformType != null) {
|
||||
if (!(this.animationProcedure.equals("empty")) && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
this.animationProcedure = "empty";
|
||||
event.getController().forceAnimationReset();
|
||||
}
|
||||
}
|
||||
}
|
||||
return PlayState.CONTINUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
var procedureController = new AnimationController<>(this, "procedureController", 0, this::procedurePredicate);
|
||||
data.add(procedureController);
|
||||
var idleController = new AnimationController<>(this, "idleController", 4, this::idlePredicate);
|
||||
var idleController = new AnimationController<>(this, "idleController", 3, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
||||
|
@ -167,7 +143,6 @@ public class AbekiriItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -49,7 +49,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class M870Item extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
public M870Item() {
|
||||
|
@ -84,9 +83,6 @@ public class M870Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (transformType != null && transformType.firstPerson()) {
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (stack.getOrCreateTag().getDouble("fire_animation") > 0 && stack.getOrCreateTag().getDouble("fire_animation") < 15) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m870.shift"));
|
||||
}
|
||||
|
@ -122,29 +118,9 @@ public class M870Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
event.getController().setAnimation(RawAnimation.begin().thenLoop("animation.m870.idle"));
|
||||
return PlayState.CONTINUE;
|
||||
}
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState procedurePredicate(AnimationState<M870Item> event) {
|
||||
if (transformType != null && transformType.firstPerson()) {
|
||||
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
this.animationProcedure = "empty";
|
||||
event.getController().forceAnimationReset();
|
||||
}
|
||||
} else if (this.animationProcedure.equals("empty")) {
|
||||
return PlayState.STOP;
|
||||
}
|
||||
}
|
||||
return PlayState.CONTINUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
var procedureController = new AnimationController<>(this, "procedureController", 0, this::procedurePredicate);
|
||||
data.add(procedureController);
|
||||
var idleController = new AnimationController<>(this, "idleController", 3, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
@ -184,7 +160,6 @@ public class M870Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -6,6 +6,7 @@ import net.mcreator.superbwarfare.ModUtils;
|
|||
import net.mcreator.superbwarfare.client.renderer.item.VectorItemRenderer;
|
||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||
import net.mcreator.superbwarfare.init.ModItems;
|
||||
import net.mcreator.superbwarfare.init.ModPerks;
|
||||
import net.mcreator.superbwarfare.init.ModSounds;
|
||||
import net.mcreator.superbwarfare.init.ModTags;
|
||||
import net.mcreator.superbwarfare.item.AnimatedItem;
|
||||
|
@ -47,7 +48,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class VectorItem extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
public VectorItem() {
|
||||
|
@ -82,11 +82,6 @@ public class VectorItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.vec.fire"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getBoolean("is_empty_reloading")) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.vec.reload_empty"));
|
||||
|
@ -106,29 +101,10 @@ public class VectorItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.vec.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState procedurePredicate(AnimationState<VectorItem> event) {
|
||||
if (transformType != null && transformType.firstPerson()) {
|
||||
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
this.animationProcedure = "empty";
|
||||
event.getController().forceAnimationReset();
|
||||
}
|
||||
} else if (this.animationProcedure.equals("empty")) {
|
||||
return PlayState.STOP;
|
||||
}
|
||||
}
|
||||
return PlayState.CONTINUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
AnimationController<VectorItem> procedureController = new AnimationController<>(this, "procedureController", 0, this::procedurePredicate);
|
||||
data.add(procedureController);
|
||||
AnimationController<VectorItem> idleController = new AnimationController<>(this, "idleController", 4, this::idlePredicate);
|
||||
AnimationController<VectorItem> idleController = new AnimationController<>(this, "idleController", 2, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
||||
|
@ -162,7 +138,6 @@ public class VectorItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -177,6 +152,6 @@ public class VectorItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public boolean canApplyPerk(Perk perk) {
|
||||
return PerkHelper.SMG_PERKS.test(perk) || PerkHelper.MAGAZINE_PERKS.test(perk);
|
||||
return PerkHelper.SMG_PERKS.test(perk) || PerkHelper.MAGAZINE_PERKS.test(perk) || perk == ModPerks.DESPERADO.get();
|
||||
}
|
||||
}
|
|
@ -47,7 +47,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class HuntingRifleItem extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
public HuntingRifleItem() {
|
||||
|
@ -87,12 +86,6 @@ public class HuntingRifleItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.hunting_rifle.fire"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getBoolean("is_empty_reloading")) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.hunting_rifle.reload"));
|
||||
}
|
||||
|
@ -106,26 +99,9 @@ public class HuntingRifleItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
}
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.hunting_rifle.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState procedurePredicate(AnimationState<HuntingRifleItem> event) {
|
||||
if (transformType != null && transformType.firstPerson()) {
|
||||
if (!(this.animationProcedure.equals("empty")) && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
this.animationProcedure = "empty";
|
||||
event.getController().forceAnimationReset();
|
||||
}
|
||||
}
|
||||
}
|
||||
return PlayState.CONTINUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
var procedureController = new AnimationController<>(this, "procedureController", 0, this::procedurePredicate);
|
||||
data.add(procedureController);
|
||||
var idleController = new AnimationController<>(this, "idleController", 4, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
@ -156,7 +132,6 @@ public class HuntingRifleItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -46,7 +46,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class K98Item extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
public K98Item() {
|
||||
|
@ -81,15 +80,10 @@ public class K98Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
if (stack.getOrCreateTag().getInt("bolt_action_anim") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.k98.shift"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.k98.fire"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getBoolean("is_empty_reloading")) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.k98.reload_empty"));
|
||||
}
|
||||
|
@ -112,8 +106,6 @@ public class K98Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.k98.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState idlePredicate(AnimationState<K98Item> event) {
|
||||
LocalPlayer player = Minecraft.getInstance().player;
|
||||
|
@ -121,8 +113,6 @@ public class K98Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (player.isSprinting() && player.onGround()
|
||||
&& player.getPersistentData().getDouble("noRun") == 0
|
||||
&& !(stack.getOrCreateTag().getBoolean("is_empty_reloading"))
|
||||
|
@ -139,14 +129,12 @@ public class K98Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.k98.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
var fireAnimController = new AnimationController<>(this, "fireAnimController", 1, this::fireAnimPredicate);
|
||||
data.add(fireAnimController);
|
||||
var idleController = new AnimationController<>(this, "idleController", 4, this::idlePredicate);
|
||||
var idleController = new AnimationController<>(this, "idleController", 3, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
||||
|
@ -186,7 +174,6 @@ public class K98Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -47,7 +47,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class M98bItem extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
public M98bItem() {
|
||||
|
@ -82,15 +81,10 @@ public class M98bItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
if (stack.getOrCreateTag().getInt("bolt_action_anim") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m98b.shift"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m98b.fire"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getBoolean("is_empty_reloading")) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.m98b.reload_empty"));
|
||||
}
|
||||
|
@ -101,8 +95,6 @@ public class M98bItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m98b.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState idlePredicate(AnimationState<M98bItem> event) {
|
||||
LocalPlayer player = Minecraft.getInstance().player;
|
||||
|
@ -110,8 +102,6 @@ public class M98bItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (player.isSprinting() && player.onGround()
|
||||
&& player.getPersistentData().getDouble("noRun") == 0
|
||||
&& !(stack.getOrCreateTag().getBoolean("is_normal_reloading") || stack.getOrCreateTag().getBoolean("is_empty_reloading")) && ClientEventHandler.drawTime < 0.01) {
|
||||
|
@ -124,14 +114,12 @@ public class M98bItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m98b.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
var fireAnimController = new AnimationController<>(this, "fireAnimController", 1, this::fireAnimPredicate);
|
||||
data.add(fireAnimController);
|
||||
var idleController = new AnimationController<>(this, "idleController", 4, this::idlePredicate);
|
||||
var idleController = new AnimationController<>(this, "idleController", 3, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
||||
|
@ -165,7 +153,6 @@ public class M98bItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -46,7 +46,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class MosinNagantItem extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
public MosinNagantItem() {
|
||||
|
@ -81,15 +80,10 @@ public class MosinNagantItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
if (stack.getOrCreateTag().getInt("bolt_action_anim") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.mosin.shift"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.mosin.fire"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getInt("reload_stage") == 1 && stack.getOrCreateTag().getInt("ammo") == 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.mosin.prepare_empty"));
|
||||
}
|
||||
|
@ -112,8 +106,6 @@ public class MosinNagantItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.mosin.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState idlePredicate(AnimationState<MosinNagantItem> event) {
|
||||
LocalPlayer player = Minecraft.getInstance().player;
|
||||
|
@ -121,8 +113,6 @@ public class MosinNagantItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (player.isSprinting() && player.onGround()
|
||||
&& player.getPersistentData().getDouble("noRun") == 0
|
||||
&& !(stack.getOrCreateTag().getBoolean("is_empty_reloading"))
|
||||
|
@ -139,14 +129,12 @@ public class MosinNagantItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.mosin.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
var fireAnimController = new AnimationController<>(this, "fireAnimController", 1, this::fireAnimPredicate);
|
||||
data.add(fireAnimController);
|
||||
var idleController = new AnimationController<>(this, "idleController", 4, this::idlePredicate);
|
||||
var idleController = new AnimationController<>(this, "idleController", 3, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
||||
|
@ -186,7 +174,6 @@ public class MosinNagantItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -47,7 +47,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class Ntw20Item extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
public Ntw20Item() {
|
||||
|
@ -87,7 +86,6 @@ public class Ntw20Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
if (stack.getOrCreateTag().getInt("bolt_action_anim") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.ntw_20.shift"));
|
||||
}
|
||||
|
@ -106,8 +104,6 @@ public class Ntw20Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ntw_20.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState idlePredicate(AnimationState<Ntw20Item> event) {
|
||||
LocalPlayer player = Minecraft.getInstance().player;
|
||||
|
@ -115,8 +111,6 @@ public class Ntw20Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (player.isSprinting() && player.onGround()
|
||||
&& player.getPersistentData().getDouble("noRun") == 0
|
||||
&& !(stack.getOrCreateTag().getBoolean("is_normal_reloading") || stack.getOrCreateTag().getBoolean("is_empty_reloading"))
|
||||
|
@ -130,12 +124,10 @@ public class Ntw20Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ntw_20.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
var fireAnimController = new AnimationController<>(this, "fireAnimController", 1, this::fireAnimPredicate);
|
||||
var fireAnimController = new AnimationController<>(this, "fireAnimController", 0, this::fireAnimPredicate);
|
||||
data.add(fireAnimController);
|
||||
var idleController = new AnimationController<>(this, "idleController", 4, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
|
@ -166,7 +158,6 @@ public class Ntw20Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -61,7 +61,6 @@ public class SentinelItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
private final Supplier<Integer> energyCapacity;
|
||||
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
public SentinelItem() {
|
||||
|
@ -131,15 +130,10 @@ public class SentinelItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
if (stack.getOrCreateTag().getInt("bolt_action_anim") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.sentinel.shift"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.sentinel.fire"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getBoolean("is_empty_reloading")) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.sentinel.reload_empty"));
|
||||
}
|
||||
|
@ -154,8 +148,6 @@ public class SentinelItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.sentinel.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState idlePredicate(AnimationState<SentinelItem> event) {
|
||||
LocalPlayer player = Minecraft.getInstance().player;
|
||||
|
@ -163,8 +155,6 @@ public class SentinelItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (player.isSprinting() && player.onGround()
|
||||
&& player.getPersistentData().getDouble("noRun") == 0
|
||||
&& !(stack.getOrCreateTag().getBoolean("is_normal_reloading") || stack.getOrCreateTag().getBoolean("is_empty_reloading"))
|
||||
|
@ -178,8 +168,6 @@ public class SentinelItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.sentinel.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
|
@ -251,7 +239,6 @@ public class SentinelItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -47,7 +47,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class SvdItem extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
public SvdItem() {
|
||||
|
@ -82,13 +81,6 @@ public class SvdItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
var tag = stack.getOrCreateTag();
|
||||
|
||||
if (tag.getInt("fire_animation") > 0) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.svd.fire"));
|
||||
}
|
||||
|
||||
if (stack.getOrCreateTag().getBoolean("is_empty_reloading")) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.svd.reload_empty"));
|
||||
}
|
||||
|
@ -107,28 +99,9 @@ public class SvdItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.svd.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState procedurePredicate(AnimationState<SvdItem> event) {
|
||||
if (transformType != null && transformType.firstPerson()) {
|
||||
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
this.animationProcedure = "empty";
|
||||
event.getController().forceAnimationReset();
|
||||
}
|
||||
} else if (this.animationProcedure.equals("empty")) {
|
||||
return PlayState.STOP;
|
||||
}
|
||||
}
|
||||
return PlayState.CONTINUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
var procedureController = new AnimationController<>(this, "procedureController", 0, this::procedurePredicate);
|
||||
data.add(procedureController);
|
||||
var idleController = new AnimationController<>(this, "idleController", 4, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
@ -163,7 +136,6 @@ public class SvdItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -6,9 +6,11 @@ import net.mcreator.superbwarfare.ModUtils;
|
|||
import net.mcreator.superbwarfare.client.renderer.item.BocekItemRenderer;
|
||||
import net.mcreator.superbwarfare.event.ClientEventHandler;
|
||||
import net.mcreator.superbwarfare.init.ModItems;
|
||||
import net.mcreator.superbwarfare.init.ModPerks;
|
||||
import net.mcreator.superbwarfare.init.ModTags;
|
||||
import net.mcreator.superbwarfare.item.AnimatedItem;
|
||||
import net.mcreator.superbwarfare.item.gun.GunItem;
|
||||
import net.mcreator.superbwarfare.perk.Perk;
|
||||
import net.mcreator.superbwarfare.tools.GunsTool;
|
||||
import net.mcreator.superbwarfare.tools.TooltipTool;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
@ -45,7 +47,6 @@ import java.util.function.Consumer;
|
|||
|
||||
public class BocekItem extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
|
||||
public BocekItem() {
|
||||
|
@ -88,33 +89,11 @@ public class BocekItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
}
|
||||
}
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
event.getController().setAnimation(RawAnimation.begin().thenLoop("animation.bocek.idle"));
|
||||
return PlayState.CONTINUE;
|
||||
}
|
||||
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState procedurePredicate(AnimationState<BocekItem> event) {
|
||||
if (transformType != null && transformType.firstPerson()) {
|
||||
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
this.animationProcedure = "empty";
|
||||
event.getController().forceAnimationReset();
|
||||
}
|
||||
} else if (this.animationProcedure.equals("empty")) {
|
||||
return PlayState.STOP;
|
||||
}
|
||||
}
|
||||
return PlayState.CONTINUE;
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.bocek.idle"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
var procedureController = new AnimationController<>(this, "procedureController", 0, this::procedurePredicate);
|
||||
data.add(procedureController);
|
||||
var idleController = new AnimationController<>(this, "idleController", 3, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
@ -187,7 +166,6 @@ public class BocekItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -199,4 +177,13 @@ public class BocekItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
public String getGunDisplayName() {
|
||||
return " Bocek";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canApplyPerk(Perk perk) {
|
||||
return switch (perk.type) {
|
||||
case AMMO -> true;
|
||||
case FUNCTIONAL -> perk == ModPerks.FIELD_DOCTOR.get();
|
||||
case DAMAGE -> perk == ModPerks.MONSTER_HUNTER.get() || perk == ModPerks.KILLING_TALLY.get();
|
||||
};
|
||||
}
|
||||
}
|
|
@ -57,7 +57,6 @@ import java.util.function.Supplier;
|
|||
|
||||
public class TaserItem extends GunItem implements GeoItem, AnimatedItem {
|
||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||
public String animationProcedure = "empty";
|
||||
public static ItemDisplayContext transformType;
|
||||
private final Supplier<Integer> energyCapacity;
|
||||
|
||||
|
@ -132,8 +131,6 @@ public class TaserItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
ItemStack stack = player.getMainHandItem();
|
||||
if (!stack.is(ModTags.Items.GUN)) return PlayState.STOP;
|
||||
|
||||
if (this.animationProcedure.equals("empty")) {
|
||||
|
||||
if (stack.getOrCreateTag().getInt("fire_animation") > 1) {
|
||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.taser.fire"));
|
||||
}
|
||||
|
@ -152,26 +149,9 @@ public class TaserItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.taser.idle"));
|
||||
}
|
||||
return PlayState.STOP;
|
||||
}
|
||||
|
||||
private PlayState procedurePredicate(AnimationState<TaserItem> event) {
|
||||
if (transformType != null && transformType.firstPerson()) {
|
||||
if (!(this.animationProcedure.equals("empty")) && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||
this.animationProcedure = "empty";
|
||||
event.getController().forceAnimationReset();
|
||||
}
|
||||
}
|
||||
}
|
||||
return PlayState.CONTINUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerControllers(AnimatableManager.ControllerRegistrar data) {
|
||||
AnimationController<TaserItem> procedureController = new AnimationController<>(this, "procedureController", 0, this::procedurePredicate);
|
||||
data.add(procedureController);
|
||||
AnimationController<TaserItem> idleController = new AnimationController<>(this, "idleController", 3, this::idlePredicate);
|
||||
data.add(idleController);
|
||||
}
|
||||
|
@ -247,7 +227,6 @@ public class TaserItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void setAnimationProcedure(String procedure) {
|
||||
this.animationProcedure = procedure;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -173,118 +173,122 @@
|
|||
"bones": {
|
||||
"0": {
|
||||
"rotation": {
|
||||
"0.1167": {
|
||||
"0.0": {
|
||||
"vector": [0, 0, 0]
|
||||
},
|
||||
"0.2167": {
|
||||
"vector": [6.22824, 1.18826, 5.97426]
|
||||
"0.1": {
|
||||
"vector": [3.4, 1.25, 4.95]
|
||||
},
|
||||
"0.4": {
|
||||
"vector": [-13.30086, 5.34654, 0.37241]
|
||||
},
|
||||
"0.4667": {
|
||||
"vector": [-13.59467, 1.59889, -16.0597]
|
||||
},
|
||||
"0.5333": {
|
||||
"vector": [-14.32523, -1.08564, -26.90473]
|
||||
},
|
||||
"0.7333": {
|
||||
"vector": [-14.30348, -1.33052, -27.87588]
|
||||
},
|
||||
"0.8": {
|
||||
"vector": [-6.36856, -0.15301, -22.00875],
|
||||
"0.35": {
|
||||
"vector": [-13.59467, 1.59889, -0.0597],
|
||||
"easing": "easeInElastic"
|
||||
},
|
||||
"1.05": {
|
||||
"vector": [-11.32739, -0.93021, -26.94156],
|
||||
"easing": "easeInOutSine"
|
||||
"0.5167": {
|
||||
"vector": [-13.59467, 1.59889, -16.0597]
|
||||
},
|
||||
"1.4": {
|
||||
"vector": [-11.26067, 1.08, -16.88997]
|
||||
"0.6333": {
|
||||
"vector": [-14.32523, -1.08564, -11.90473]
|
||||
},
|
||||
"1.5167": {
|
||||
"vector": [-11.24975, 1.6251, -14.19388]
|
||||
"0.7333": {
|
||||
"vector": [-14.30348, -1.33052, -12.87588]
|
||||
},
|
||||
"1.6333": {
|
||||
"0.8": {
|
||||
"vector": [-4.36856, -0.15301, -17.00875],
|
||||
"easing": "easeInElastic"
|
||||
},
|
||||
"0.9333": {
|
||||
"vector": [-11.32739, -0.93021, -6.94156],
|
||||
"easing": "easeOutSine"
|
||||
},
|
||||
"1.1333": {
|
||||
"vector": [-11.24975, 1.6251, -6.69388]
|
||||
},
|
||||
"1.3": {
|
||||
"vector": [-9.97469, 3.02705, -17.6383]
|
||||
},
|
||||
"1.7333": {
|
||||
"vector": [-9.86643, 3.67788, -17.84913]
|
||||
},
|
||||
"1.8": {
|
||||
"vector": [-10.03014, 2.69913, -17.54102]
|
||||
},
|
||||
"1.8667": {
|
||||
"vector": [-17.05451, 6.16944, -16.87618]
|
||||
},
|
||||
"1.95": {
|
||||
"vector": [-16.50231, 2.86329, -17.58898]
|
||||
"1.8667": {
|
||||
"vector": [-8.03014, 2.69913, -17.54102]
|
||||
},
|
||||
"2.05": {
|
||||
"vector": [0.1, 1.74, -4.02]
|
||||
},
|
||||
"2.1833": {
|
||||
"vector": [4, 0, 0],
|
||||
"easing": "easeInOutSine"
|
||||
"2.25": {
|
||||
"vector": [2, 0, 2.25]
|
||||
},
|
||||
"2.4667": {
|
||||
"2.4333": {
|
||||
"vector": [0, 0, 0],
|
||||
"easing": "easeInElastic"
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"0.1167": {
|
||||
"0.0": {
|
||||
"vector": [0, 0, 0]
|
||||
},
|
||||
"0.1": {
|
||||
"vector": [-0.1, 0.1, -0.1],
|
||||
"easing": "easeInElastic"
|
||||
},
|
||||
"0.2": {
|
||||
"vector": [-0.1, 0.52, 0.9],
|
||||
"easing": "easeInElastic"
|
||||
},
|
||||
"0.4": {
|
||||
"vector": [-1.1, 0.3, -0.1],
|
||||
"easing": "easeInQuad"
|
||||
"vector": [-0.1, 0.7, -0.1],
|
||||
"easing": "easeOutQuad"
|
||||
},
|
||||
"0.5333": {
|
||||
"vector": [-1.1, 0, -0.6]
|
||||
"vector": [-0.1, 0.5, -0.6]
|
||||
},
|
||||
"0.6333": {
|
||||
"vector": [-0.1, 0.25, -0.6]
|
||||
},
|
||||
"0.7333": {
|
||||
"vector": [-1.1, 0, -0.6]
|
||||
"vector": [-0.1, 0.25, -0.6]
|
||||
},
|
||||
"0.8": {
|
||||
"vector": [-0.63505, -0.5511, -0.70059]
|
||||
"vector": [0.36495, -0.3011, -0.70059]
|
||||
},
|
||||
"0.95": {
|
||||
"vector": [-1.04863, 0.13019, -0.57971]
|
||||
"1.05": {
|
||||
"vector": [-0.04863, 0.13019, -0.57971]
|
||||
},
|
||||
"1.4333": {
|
||||
"vector": [-0.89683, -0.10129, -0.60415]
|
||||
"1.2": {
|
||||
"vector": [0.10317, -0.10129, -0.60415]
|
||||
},
|
||||
"1.5667": {
|
||||
"vector": [-0.85675, 0.06078, -0.58657]
|
||||
"1.45": {
|
||||
"vector": [0.14325, 0.06078, -0.58657]
|
||||
},
|
||||
"1.7333": {
|
||||
"vector": [-0.88732, 0.11258, -0.78102]
|
||||
"vector": [0.11268, 0.11258, -0.78102]
|
||||
},
|
||||
"1.8": {
|
||||
"vector": [-0.85209, 0.0351, -0.49198]
|
||||
"vector": [0.14791, 0.0351, -0.49198]
|
||||
},
|
||||
"1.8667": {
|
||||
"vector": [-1.5395, 0.79301, -0.39434]
|
||||
"vector": [-0.5395, 0.29301, -0.39434]
|
||||
},
|
||||
"1.95": {
|
||||
"vector": [-0.85209, 0.0351, -0.49198]
|
||||
"vector": [0.14791, 0.0351, -0.49198]
|
||||
},
|
||||
"2.0167": {
|
||||
"vector": [-0.59166, -0.35741, -0.73343],
|
||||
"vector": [0.40834, -0.35741, -0.73343],
|
||||
"easing": "easeInSine"
|
||||
},
|
||||
"2.0833": {
|
||||
"vector": [-0.06, -0.17, -0.42]
|
||||
"vector": [0.44, -0.17, -0.42]
|
||||
},
|
||||
"2.2167": {
|
||||
"vector": [0.2, -0.2, -0.2]
|
||||
"2.1667": {
|
||||
"vector": [0, 0.06, 0.14844]
|
||||
},
|
||||
"2.2833": {
|
||||
"vector": [0.14, -0.14, 0.5],
|
||||
"easing": "easeInSine"
|
||||
"2.2667": {
|
||||
"vector": [0, 0.02, 0.8986]
|
||||
},
|
||||
"2.4667": {
|
||||
"2.4167": {
|
||||
"vector": [0, 0, 0],
|
||||
"easing": "easeInElastic"
|
||||
}
|
||||
|
@ -295,32 +299,38 @@
|
|||
"0.7167": {
|
||||
"vector": [0, 0, 0]
|
||||
},
|
||||
"0.8667": {
|
||||
"0.9167": {
|
||||
"vector": [22.5, 0, 0]
|
||||
},
|
||||
"0.9167": {
|
||||
"0.9667": {
|
||||
"vector": [0, 0, 0]
|
||||
},
|
||||
"1.1": {
|
||||
"vector": [-12.5, -70, -130]
|
||||
},
|
||||
"1.2167": {
|
||||
"1.1667": {
|
||||
"vector": [-12.5, -70, -130]
|
||||
},
|
||||
"1.3167": {
|
||||
"1.2333": {
|
||||
"vector": [1.51, -72.16, -135.34]
|
||||
},
|
||||
"1.3667": {
|
||||
"1.2833": {
|
||||
"vector": [-0.58781, -40.02039, -106.56534]
|
||||
},
|
||||
"1.5": {
|
||||
"1.4333": {
|
||||
"vector": [-14.72777, -7.86614, -33.43033],
|
||||
"easing": "easeInOutSine"
|
||||
},
|
||||
"1.6333": {
|
||||
"vector": [-14.63843, -5.6156, -7.36216],
|
||||
"1.5333": {
|
||||
"vector": [-22.63843, -5.6156, -7.36216],
|
||||
"easing": "easeInOutSine"
|
||||
},
|
||||
"1.65": {
|
||||
"vector": [-12, 0, 0]
|
||||
},
|
||||
"1.7167": {
|
||||
"vector": [-11.39, 0, 0]
|
||||
},
|
||||
"1.8333": {
|
||||
"vector": [0, 0, 0]
|
||||
},
|
||||
|
@ -332,36 +342,40 @@
|
|||
"0.7167": {
|
||||
"vector": [0, 0, 0]
|
||||
},
|
||||
"0.8667": {
|
||||
"0.9167": {
|
||||
"vector": [0, -10, 3],
|
||||
"easing": "easeInSine"
|
||||
},
|
||||
"0.9167": {
|
||||
"0.9667": {
|
||||
"vector": [0, -10, 0],
|
||||
"easing": "easeInSine"
|
||||
},
|
||||
"1.1": {
|
||||
"vector": [3.05, -7.25, 7.56]
|
||||
},
|
||||
"1.2167": {
|
||||
"1.1667": {
|
||||
"vector": [4.08351, -1.47888, 4.9022],
|
||||
"easing": "easeInOutSine"
|
||||
},
|
||||
"1.3333": {
|
||||
"1.25": {
|
||||
"vector": [5.1, 0.44, 3.5]
|
||||
},
|
||||
"1.4667": {
|
||||
"1.4": {
|
||||
"vector": [2.86, -1.65, -0.74]
|
||||
},
|
||||
"1.6333": {
|
||||
"vector": [0.39786, -0.49924, -1.91536],
|
||||
"1.5333": {
|
||||
"vector": [0.39786, 0.10076, -1.31536],
|
||||
"easing": "easeInOutSine"
|
||||
},
|
||||
"1.7333": {
|
||||
"vector": [0.31674, 0.15258, -1.47242]
|
||||
"1.6333": {
|
||||
"vector": [0, -0.26562, -0.6]
|
||||
},
|
||||
"1.7167": {
|
||||
"vector": [0, -0.23203, -0.53359]
|
||||
},
|
||||
"1.8333": {
|
||||
"vector": [0, 0, 0]
|
||||
"vector": [0, 0, 0],
|
||||
"easing": "easeInElastic"
|
||||
},
|
||||
"1.8833": {
|
||||
"vector": [0, 0, 0]
|
||||
|
@ -446,115 +460,127 @@
|
|||
},
|
||||
"Lefthand": {
|
||||
"rotation": {
|
||||
"0.45": {
|
||||
"0.4167": {
|
||||
"vector": [0, 0, 0]
|
||||
},
|
||||
"0.65": {
|
||||
"0.5833": {
|
||||
"vector": [-10.83774, -11.3082, 26.01338],
|
||||
"easing": "easeInElastic"
|
||||
},
|
||||
"0.6667": {
|
||||
"vector": [-10.83774, -11.3082, 26.01338],
|
||||
"easing": "easeInOutSine"
|
||||
},
|
||||
"0.7167": {
|
||||
"vector": [-10.83774, -11.3082, 26.01338],
|
||||
"easing": "easeInOutSine"
|
||||
"vector": [-10.84, -11.31, 26.01]
|
||||
},
|
||||
"0.8667": {
|
||||
"0.9167": {
|
||||
"vector": [-12.84863, -4.82913, 20.93756],
|
||||
"easing": "easeOutSine"
|
||||
},
|
||||
"0.9167": {
|
||||
"0.9667": {
|
||||
"vector": [10.233, 10.2596, 3.51854],
|
||||
"easing": "easeOutSine"
|
||||
},
|
||||
"1.1": {
|
||||
"vector": [-49.77006, 64.26495, -91.19885]
|
||||
},
|
||||
"1.2167": {
|
||||
"1.1667": {
|
||||
"vector": [-47.55314, 65.39596, -103.44208]
|
||||
},
|
||||
"1.3333": {
|
||||
"1.25": {
|
||||
"vector": [-46.07222, 70.25928, -87.18593]
|
||||
},
|
||||
"1.4167": {
|
||||
"1.35": {
|
||||
"vector": [-16.54273, 37.67935, -40.57865]
|
||||
},
|
||||
"1.4667": {
|
||||
"1.4": {
|
||||
"vector": [-13.14801, 19.23814, -10.56439]
|
||||
},
|
||||
"1.6333": {
|
||||
"vector": [-20.25269, -1.46265, 34.2655],
|
||||
"1.5333": {
|
||||
"vector": [-10.79618, 6.21927, 22.54367],
|
||||
"easing": "linear"
|
||||
},
|
||||
"1.6333": {
|
||||
"vector": [-27.96238, -13.84396, 58.89893]
|
||||
},
|
||||
"1.7333": {
|
||||
"vector": [-19.79877, 2.91654, 27.55355],
|
||||
"vector": [-23.9632, -12.39386, 52.59974],
|
||||
"easing": "linear"
|
||||
},
|
||||
"1.8333": {
|
||||
"vector": [-20.25269, -1.46265, 34.2655],
|
||||
"vector": [-23.9632, -12.39386, 52.59974],
|
||||
"easing": "linear"
|
||||
},
|
||||
"1.9667": {
|
||||
"vector": [-20.25269, -1.46265, 34.2655],
|
||||
"1.9167": {
|
||||
"vector": [-23.9632, -12.39386, 52.59974],
|
||||
"easing": "linear"
|
||||
},
|
||||
"2.15": {
|
||||
"2.0833": {
|
||||
"vector": [0, 0, 0]
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"0.45": {
|
||||
"0.4167": {
|
||||
"vector": [0, 0, 0]
|
||||
},
|
||||
"0.65": {
|
||||
"0.5833": {
|
||||
"vector": [-2.59069, -0.63326, 6.31688],
|
||||
"easing": "easeInElastic"
|
||||
},
|
||||
"0.6667": {
|
||||
"vector": [-2.59069, -0.63326, 6.31688],
|
||||
"easing": "easeInOutSine"
|
||||
},
|
||||
"0.7167": {
|
||||
"vector": [-2.59, -1.63, 5.67],
|
||||
"easing": "easeInOutSine"
|
||||
"vector": [-2.59, -1.29, 5.89]
|
||||
},
|
||||
"0.8667": {
|
||||
"0.9167": {
|
||||
"vector": [-2.69069, -12.23326, 9.61688],
|
||||
"easing": "easeInSine"
|
||||
},
|
||||
"0.9167": {
|
||||
"0.9667": {
|
||||
"vector": [-1.09069, -13.13326, 3.41688],
|
||||
"easing": "easeInSine"
|
||||
},
|
||||
"1.1": {
|
||||
"vector": [3.78778, -5.55218, 11.79434]
|
||||
},
|
||||
"1.2167": {
|
||||
"1.1667": {
|
||||
"vector": [6.50262, 0.9929, 8.56821]
|
||||
},
|
||||
"1.3333": {
|
||||
"1.25": {
|
||||
"vector": [6.51159, 0.43131, 6.5098]
|
||||
},
|
||||
"1.4167": {
|
||||
"1.35": {
|
||||
"vector": [5.08812, -0.82527, 5.37621]
|
||||
},
|
||||
"1.4667": {
|
||||
"1.4": {
|
||||
"vector": [1.61237, -3.02671, 4.36969]
|
||||
},
|
||||
"1.5333": {
|
||||
"1.4667": {
|
||||
"vector": [-0.78777, -2.78872, 4.5296]
|
||||
},
|
||||
"1.6333": {
|
||||
"1.5333": {
|
||||
"vector": [-3.9135, -3.08305, 4.31438],
|
||||
"easing": "linear"
|
||||
},
|
||||
"1.6333": {
|
||||
"vector": [-5.03219, -1.54203, 6.77]
|
||||
},
|
||||
"1.7333": {
|
||||
"vector": [-4.15934, -1.43666, 5.42372],
|
||||
"vector": [-4.22575, -1.43666, 6.09951],
|
||||
"easing": "linear"
|
||||
},
|
||||
"1.8333": {
|
||||
"vector": [-4.67327, -2.9611, 6.66323],
|
||||
"vector": [-4.22575, -1.43666, 6.09951],
|
||||
"easing": "linear"
|
||||
},
|
||||
"1.9667": {
|
||||
"vector": [-4.67327, -2.9611, 6.66323],
|
||||
"1.9167": {
|
||||
"vector": [-4.22575, -1.43666, 6.09951],
|
||||
"easing": "linear"
|
||||
},
|
||||
"2.15": {
|
||||
"2.0833": {
|
||||
"vector": [0, 0, 0]
|
||||
}
|
||||
}
|
||||
|
@ -615,6 +641,11 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"sound_effects": {
|
||||
"0.0": {
|
||||
"effect": "ak_12_reload_normal"
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.ak12.reload_empty": {
|
||||
|
@ -753,24 +784,30 @@
|
|||
"1.2167": {
|
||||
"vector": [-12.5, -70, -130]
|
||||
},
|
||||
"1.3167": {
|
||||
"1.3": {
|
||||
"vector": [1.51, -72.16, -135.34]
|
||||
},
|
||||
"1.3667": {
|
||||
"1.35": {
|
||||
"vector": [-0.58781, -40.02039, -106.56534]
|
||||
},
|
||||
"1.4667": {
|
||||
"1.5": {
|
||||
"vector": [-14.72777, -7.86614, -33.43033],
|
||||
"easing": "easeInOutSine"
|
||||
},
|
||||
"1.6333": {
|
||||
"vector": [-14.63843, -5.6156, -7.36216],
|
||||
"1.6": {
|
||||
"vector": [-22.63843, -5.6156, -7.36216],
|
||||
"easing": "easeInOutSine"
|
||||
},
|
||||
"1.8333": {
|
||||
"1.7167": {
|
||||
"vector": [-12, 0, 0]
|
||||
},
|
||||
"1.7833": {
|
||||
"vector": [-11.39, 0, 0]
|
||||
},
|
||||
"1.9": {
|
||||
"vector": [0, 0, 0]
|
||||
},
|
||||
"1.8833": {
|
||||
"1.95": {
|
||||
"vector": [0, 0, 0]
|
||||
}
|
||||
},
|
||||
|
@ -810,23 +847,27 @@
|
|||
"vector": [4.08351, -1.47888, 4.9022],
|
||||
"easing": "easeInOutSine"
|
||||
},
|
||||
"1.3333": {
|
||||
"1.3167": {
|
||||
"vector": [5.1, 0.44, 3.5]
|
||||
},
|
||||
"1.4667": {
|
||||
"vector": [2.86, -1.65, -0.74]
|
||||
},
|
||||
"1.6333": {
|
||||
"vector": [0.39786, -0.49924, -1.91536],
|
||||
"1.6": {
|
||||
"vector": [0.39786, 0.10076, -1.31536],
|
||||
"easing": "easeInOutSine"
|
||||
},
|
||||
"1.7333": {
|
||||
"vector": [0.31674, 0.15258, -1.47242]
|
||||
"1.7": {
|
||||
"vector": [0, -0.26562, -0.6]
|
||||
},
|
||||
"1.8333": {
|
||||
"vector": [0, 0, 0]
|
||||
"1.7833": {
|
||||
"vector": [0, -0.23203, -0.53359]
|
||||
},
|
||||
"1.8833": {
|
||||
"1.9": {
|
||||
"vector": [0, 0, 0],
|
||||
"easing": "easeInElastic"
|
||||
},
|
||||
"1.95": {
|
||||
"vector": [0, 0, 0]
|
||||
}
|
||||
},
|
||||
|
@ -950,7 +991,7 @@
|
|||
"1.2167": {
|
||||
"vector": [-47.55314, 65.39596, -103.44208]
|
||||
},
|
||||
"1.3333": {
|
||||
"1.3167": {
|
||||
"vector": [-46.07222, 70.25928, -87.18593]
|
||||
},
|
||||
"1.4167": {
|
||||
|
@ -959,20 +1000,23 @@
|
|||
"1.4667": {
|
||||
"vector": [-13.14801, 19.23814, -10.56439]
|
||||
},
|
||||
"1.6333": {
|
||||
"vector": [-20.25269, -1.46265, 34.2655],
|
||||
"1.6": {
|
||||
"vector": [-10.79618, 6.21927, 22.54367],
|
||||
"easing": "linear"
|
||||
},
|
||||
"1.7333": {
|
||||
"vector": [-19.79877, 2.91654, 27.55355],
|
||||
"1.7": {
|
||||
"vector": [-27.96238, -13.84396, 58.89893]
|
||||
},
|
||||
"1.8": {
|
||||
"vector": [-23.9632, -12.39386, 52.59974],
|
||||
"easing": "linear"
|
||||
},
|
||||
"1.8333": {
|
||||
"vector": [-20.25269, -1.46265, 34.2655],
|
||||
"1.9": {
|
||||
"vector": [-23.9632, -12.39386, 52.59974],
|
||||
"easing": "linear"
|
||||
},
|
||||
"1.9667": {
|
||||
"vector": [-20.25269, -1.46265, 34.2655],
|
||||
"1.9833": {
|
||||
"vector": [-23.9632, -12.39386, 52.59974],
|
||||
"easing": "linear"
|
||||
},
|
||||
"2.15": {
|
||||
|
@ -1011,7 +1055,7 @@
|
|||
"1.2167": {
|
||||
"vector": [6.50262, 0.9929, 8.56821]
|
||||
},
|
||||
"1.3333": {
|
||||
"1.3167": {
|
||||
"vector": [6.51159, 0.43131, 6.5098]
|
||||
},
|
||||
"1.4167": {
|
||||
|
@ -1023,20 +1067,23 @@
|
|||
"1.5333": {
|
||||
"vector": [-0.78777, -2.78872, 4.5296]
|
||||
},
|
||||
"1.6333": {
|
||||
"1.6": {
|
||||
"vector": [-3.9135, -3.08305, 4.31438],
|
||||
"easing": "linear"
|
||||
},
|
||||
"1.7333": {
|
||||
"vector": [-4.15934, -1.43666, 5.42372],
|
||||
"1.7": {
|
||||
"vector": [-5.03219, -1.54203, 6.77]
|
||||
},
|
||||
"1.8": {
|
||||
"vector": [-4.22575, -1.43666, 6.09951],
|
||||
"easing": "linear"
|
||||
},
|
||||
"1.8333": {
|
||||
"vector": [-4.67327, -2.9611, 6.66323],
|
||||
"1.9": {
|
||||
"vector": [-4.22575, -1.43666, 6.09951],
|
||||
"easing": "linear"
|
||||
},
|
||||
"1.9667": {
|
||||
"vector": [-4.67327, -2.9611, 6.66323],
|
||||
"1.9833": {
|
||||
"vector": [-4.22575, -1.43666, 6.09951],
|
||||
"easing": "linear"
|
||||
},
|
||||
"2.15": {
|
||||
|
@ -1186,6 +1233,11 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"sound_effects": {
|
||||
"0.0": {
|
||||
"effect": "ak_12_reload_empty"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -204,29 +204,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"animation.m60.fire2": {
|
||||
"animation_length": 0.0833,
|
||||
"bones": {
|
||||
"m60_bullet_chain": {
|
||||
"rotation": {
|
||||
"0.0": {
|
||||
"vector": [0, 0, 19.25]
|
||||
},
|
||||
"0.0833": {
|
||||
"vector": [0, 0, 0]
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"0.0": {
|
||||
"vector": [0.57813, -0.37109, 0]
|
||||
},
|
||||
"0.0833": {
|
||||
"vector": [0, 0, 0]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.m60.reload": {
|
||||
"animation_length": 6.375,
|
||||
"bones": {
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "superbwarfare:item/perk/desperado"
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 45 KiB |
Binary file not shown.
After Width: | Height: | Size: 801 B |
Loading…
Add table
Reference in a new issue