规范animationProcedure命名

This commit is contained in:
Light_Quanta 2024-05-09 20:10:28 +08:00
parent ee43a1d262
commit 367fa59ff9
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959
27 changed files with 238 additions and 233 deletions

View file

@ -6,6 +6,8 @@ import net.mcreator.target.item.gun.*;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ItemInHandRenderer;
import net.minecraft.world.item.ArmorItem;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
@ -27,139 +29,142 @@ public class ItemAnimationFactory {
@SubscribeEvent
public static void animatedItems(TickEvent.PlayerTickEvent event) {
String animation = "";
if (event.phase == TickEvent.Phase.START && (event.player.getMainHandItem().getItem() instanceof GeoItem || event.player.getOffhandItem().getItem() instanceof GeoItem)) {
if (!event.player.getMainHandItem().getOrCreateTag().getString("geckoAnim").isEmpty() && !(event.player.getMainHandItem().getItem() instanceof ArmorItem)) {
animation = event.player.getMainHandItem().getOrCreateTag().getString("geckoAnim");
event.player.getMainHandItem().getOrCreateTag().putString("geckoAnim", "");
if (event.player.getMainHandItem().getItem() instanceof Taser animatable)
String animation;
ItemStack mainHandItemStack = event.player.getMainHandItem();
Item mainHandItem = mainHandItemStack.getItem();
if (event.phase == TickEvent.Phase.START && (mainHandItem instanceof GeoItem || event.player.getOffhandItem().getItem() instanceof GeoItem)) {
if (!mainHandItemStack.getOrCreateTag().getString("geckoAnim").isEmpty() && !(mainHandItem instanceof ArmorItem)) {
animation = mainHandItemStack.getOrCreateTag().getString("geckoAnim");
mainHandItemStack.getOrCreateTag().putString("geckoAnim", "");
if (mainHandItem instanceof Taser animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof Abekiri animatable)
if (mainHandItem instanceof Abekiri animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof Trachelium animatable)
if (mainHandItem instanceof Trachelium animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof VectorItem animatable)
if (mainHandItem instanceof VectorItem animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof AK47Item animatable)
if (mainHandItem instanceof AK47Item animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof SksItem animatable)
if (mainHandItem instanceof SksItem animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof M4Item animatable)
if (mainHandItem instanceof M4Item animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof Hk416Item animatable)
if (mainHandItem instanceof Hk416Item animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof Mk14Item animatable)
if (mainHandItem instanceof Mk14Item animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof MarlinItem animatable)
if (mainHandItem instanceof MarlinItem animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof SvdItem animatable)
if (mainHandItem instanceof SvdItem animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof M98bItem animatable)
if (mainHandItem instanceof M98bItem animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof SentinelItem animatable)
if (mainHandItem instanceof SentinelItem animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof HuntingRifle animatable)
if (mainHandItem instanceof HuntingRifle animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof Kraber animatable)
if (mainHandItem instanceof Kraber animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof M870Item animatable)
if (mainHandItem instanceof M870Item animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof Aa12Item animatable)
if (mainHandItem instanceof Aa12Item animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof Devotion animatable)
if (mainHandItem instanceof Devotion animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof RpkItem animatable)
if (mainHandItem instanceof RpkItem animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof M60Item animatable)
if (mainHandItem instanceof M60Item animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof Minigun animatable)
if (mainHandItem instanceof Minigun animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof M79Item animatable)
if (mainHandItem instanceof M79Item animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof RpgItem animatable)
if (mainHandItem instanceof RpgItem animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof BocekItem animatable)
if (mainHandItem instanceof BocekItem animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof LightSaberItem animatable)
if (mainHandItem instanceof LightSaberItem animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getMainHandItem().getItem() instanceof Rocket animatable)
if (mainHandItem instanceof Rocket animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
}
@ -168,132 +173,132 @@ public class ItemAnimationFactory {
event.player.getOffhandItem().getOrCreateTag().putString("geckoAnim", "");
if (event.player.getOffhandItem().getItem() instanceof Taser animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof Abekiri animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof Trachelium animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof VectorItem animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof AK47Item animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof SksItem animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof M4Item animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof Hk416Item animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof Mk14Item animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof MarlinItem animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof SvdItem animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof M98bItem animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof SentinelItem animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof HuntingRifle animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof Kraber animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof M870Item animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof Aa12Item animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof Devotion animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof RpkItem animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof M60Item animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof Minigun animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof M79Item animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof RpgItem animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof BocekItem animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof LightSaberItem animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
if (event.player.getOffhandItem().getItem() instanceof Rocket animatable)
if (event.player.level().isClientSide()) {
animatable.animationprocedure = animation;
animatable.animationProcedure = animation;
disableUseAnim();
}
}

View file

@ -30,7 +30,7 @@ import java.util.function.Consumer;
public class LightSaberItem extends SwordItem implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public LightSaberItem() {
@ -56,7 +56,7 @@ public class LightSaberItem extends SwordItem implements GeoItem {
private PlayState idlePredicate(AnimationState event) {
if (transformType != null && transformType.firstPerson()) {
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
event.getController().setAnimation(RawAnimation.begin().thenLoop("animation.lightsaber.idle"));
return PlayState.CONTINUE;
}
@ -66,13 +66,13 @@ public class LightSaberItem extends SwordItem implements GeoItem {
private PlayState procedurePredicate(AnimationState 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 (!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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
} else if (this.animationprocedure.equals("empty")) {
} else if (this.animationProcedure.equals("empty")) {
return PlayState.STOP;
}
}

View file

@ -28,7 +28,7 @@ import java.util.function.Consumer;
public class Rocket extends Item implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public Rocket() {
@ -54,7 +54,7 @@ public class Rocket extends Item implements GeoItem {
private PlayState idlePredicate(AnimationState event) {
if (transformType != null && transformType.firstPerson()) {
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
event.getController().setAnimation(RawAnimation.begin().thenLoop("animation.rpg.idle"));
return PlayState.CONTINUE;
}
@ -64,13 +64,13 @@ public class Rocket extends Item implements GeoItem {
private PlayState procedurePredicate(AnimationState 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 (!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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
} else if (this.animationprocedure.equals("empty")) {
} else if (this.animationProcedure.equals("empty")) {
return PlayState.STOP;
}
}

View file

@ -37,7 +37,7 @@ import java.util.function.Consumer;
public class AK47Item extends GunItem implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public AK47Item() {
@ -70,7 +70,7 @@ public class AK47Item extends GunItem implements GeoItem {
LocalPlayer player = Minecraft.getInstance().player;
ItemStack stack = player.getMainHandItem();
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak47.draw"));
@ -107,13 +107,13 @@ public class AK47Item extends GunItem implements GeoItem {
private PlayState procedurePredicate(AnimationState 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 (!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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
} else if (this.animationprocedure.equals("empty")) {
} else if (this.animationProcedure.equals("empty")) {
return PlayState.STOP;
}
}

View file

@ -43,7 +43,7 @@ import java.util.function.Consumer;
public class Aa12Item extends GunItem implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public Aa12Item() {
@ -76,7 +76,7 @@ public class Aa12Item extends GunItem implements GeoItem {
LocalPlayer player = Minecraft.getInstance().player;
ItemStack stack = player.getMainHandItem();
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.aa12.draw"));
@ -113,13 +113,13 @@ public class Aa12Item extends GunItem implements GeoItem {
private PlayState procedurePredicate(AnimationState 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 (!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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
} else if (this.animationprocedure.equals("empty")) {
} else if (this.animationProcedure.equals("empty")) {
return PlayState.STOP;
}
}

View file

@ -39,7 +39,7 @@ import java.util.function.Consumer;
public class Abekiri extends GunItem implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public Abekiri() {
@ -72,7 +72,7 @@ public class Abekiri extends GunItem implements GeoItem {
LocalPlayer player = Minecraft.getInstance().player;
ItemStack stack = player.getMainHandItem();
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 11) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ab.draw"));
@ -101,10 +101,10 @@ public class Abekiri extends GunItem implements GeoItem {
private PlayState procedurePredicate(AnimationState event) {
if (transformType != null) {
if (!(this.animationprocedure.equals("empty")) && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
}

View file

@ -38,7 +38,7 @@ import java.util.function.Consumer;
public class BocekItem extends GunItem implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public BocekItem() {
@ -76,7 +76,7 @@ public class BocekItem extends GunItem implements GeoItem {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.bocek.draw"));
}
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
event.getController().setAnimation(RawAnimation.begin().thenLoop("animation.bocek.idle"));
return PlayState.CONTINUE;
}
@ -86,13 +86,13 @@ public class BocekItem extends GunItem implements GeoItem {
private PlayState procedurePredicate(AnimationState 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 (!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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
} else if (this.animationprocedure.equals("empty")) {
} else if (this.animationProcedure.equals("empty")) {
return PlayState.STOP;
}
}

View file

@ -37,7 +37,7 @@ import java.util.function.Consumer;
public class Devotion extends GunItem implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public Devotion() {
@ -71,7 +71,7 @@ public class Devotion extends GunItem implements GeoItem {
LocalPlayer player = Minecraft.getInstance().player;
ItemStack stack = player.getMainHandItem();
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.devotion.draw"));
@ -100,10 +100,10 @@ public class Devotion extends GunItem implements GeoItem {
private PlayState procedurePredicate(AnimationState 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 (!(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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
}

View file

@ -37,7 +37,7 @@ import java.util.function.Consumer;
public class Hk416Item extends GunItem implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public Hk416Item() {
@ -70,7 +70,7 @@ public class Hk416Item extends GunItem implements GeoItem {
LocalPlayer player = Minecraft.getInstance().player;
ItemStack stack = player.getMainHandItem();
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m4.draw"));
@ -107,13 +107,13 @@ public class Hk416Item extends GunItem implements GeoItem {
private PlayState procedurePredicate(AnimationState 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 (!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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
} else if (this.animationprocedure.equals("empty")) {
} else if (this.animationProcedure.equals("empty")) {
return PlayState.STOP;
}
}

View file

@ -37,7 +37,7 @@ import java.util.function.Consumer;
public class HuntingRifle extends GunItem implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public HuntingRifle() {
@ -70,7 +70,7 @@ public class HuntingRifle extends GunItem implements GeoItem {
LocalPlayer player = Minecraft.getInstance().player;
ItemStack stack = player.getMainHandItem();
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.hunting_rifle.draw"));
@ -94,10 +94,10 @@ public class HuntingRifle extends GunItem implements GeoItem {
private PlayState procedurePredicate(AnimationState 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 (!(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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
}

View file

@ -42,7 +42,7 @@ import java.util.function.Consumer;
public class Kraber extends GunItem implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public Kraber() {
@ -74,7 +74,7 @@ public class Kraber extends GunItem implements GeoItem {
private PlayState idlePredicate(AnimationState event) {
LocalPlayer player = Minecraft.getInstance().player;
ItemStack stack = player.getMainHandItem();
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 29) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.kraber.draw"));
@ -107,13 +107,13 @@ public class Kraber extends GunItem implements GeoItem {
private PlayState procedurePredicate(AnimationState 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 (!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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
} else if (this.animationprocedure.equals("empty")) {
} else if (this.animationProcedure.equals("empty")) {
return PlayState.STOP;
}
}

View file

@ -37,7 +37,7 @@ import java.util.function.Consumer;
public class M4Item extends GunItem implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public M4Item() {
@ -70,7 +70,7 @@ public class M4Item extends GunItem implements GeoItem {
LocalPlayer player = Minecraft.getInstance().player;
ItemStack stack = player.getMainHandItem();
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m4.draw"));
@ -107,13 +107,13 @@ public class M4Item extends GunItem implements GeoItem {
private PlayState procedurePredicate(AnimationState 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 (!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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
} else if (this.animationprocedure.equals("empty")) {
} else if (this.animationProcedure.equals("empty")) {
return PlayState.STOP;
}
}

View file

@ -38,7 +38,7 @@ import java.util.function.Consumer;
public class M60Item extends GunItem implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public M60Item() {
@ -71,7 +71,7 @@ public class M60Item extends GunItem implements GeoItem {
LocalPlayer player = Minecraft.getInstance().player;
ItemStack stack = player.getMainHandItem();
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 29) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m60.draw"));
@ -112,13 +112,13 @@ public class M60Item extends GunItem implements GeoItem {
private PlayState procedurePredicate(AnimationState 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 (!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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
} else if (this.animationprocedure.equals("empty")) {
} else if (this.animationProcedure.equals("empty")) {
return PlayState.STOP;
}
}

View file

@ -38,7 +38,7 @@ import java.util.function.Consumer;
public class M79Item extends GunItem implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public M79Item() {
@ -71,7 +71,7 @@ public class M79Item extends GunItem implements GeoItem {
LocalPlayer player = Minecraft.getInstance().player;
ItemStack stack = player.getMainHandItem();
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m79.draw"));
@ -96,10 +96,10 @@ public class M79Item extends GunItem implements GeoItem {
private PlayState procedurePredicate(AnimationState 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 (!(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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
}

View file

@ -39,7 +39,7 @@ import java.util.function.Consumer;
public class M870Item extends GunItem implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public M870Item() {
@ -74,7 +74,7 @@ public class M870Item extends GunItem implements GeoItem {
ItemStack stack = player.getMainHandItem();
if (transformType != null && transformType.firstPerson()) {
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m870.draw"));
@ -117,13 +117,13 @@ public class M870Item extends GunItem implements GeoItem {
private PlayState procedurePredicate(AnimationState 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 (!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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
} else if (this.animationprocedure.equals("empty")) {
} else if (this.animationProcedure.equals("empty")) {
return PlayState.STOP;
}
}

View file

@ -37,7 +37,7 @@ import java.util.function.Consumer;
public class M98bItem extends GunItem implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public M98bItem() {
@ -70,7 +70,7 @@ public class M98bItem extends GunItem implements GeoItem {
LocalPlayer player = Minecraft.getInstance().player;
ItemStack stack = player.getMainHandItem();
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m98b.draw"));
@ -103,13 +103,13 @@ public class M98bItem extends GunItem implements GeoItem {
private PlayState procedurePredicate(AnimationState 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 (!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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
} else if (this.animationprocedure.equals("empty")) {
} else if (this.animationProcedure.equals("empty")) {
return PlayState.STOP;
}
}

View file

@ -38,7 +38,7 @@ import java.util.function.Consumer;
public class MarlinItem extends GunItem implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public MarlinItem() {
@ -73,7 +73,7 @@ public class MarlinItem extends GunItem implements GeoItem {
ItemStack stack = player.getMainHandItem();
if (transformType != null && transformType.firstPerson()) {
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.marlin.draw"));
@ -124,13 +124,13 @@ public class MarlinItem extends GunItem implements GeoItem {
private PlayState procedurePredicate(AnimationState 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 (!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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
} else if (this.animationprocedure.equals("empty")) {
} else if (this.animationProcedure.equals("empty")) {
return PlayState.STOP;
}
}

View file

@ -45,7 +45,7 @@ import java.util.function.Consumer;
public class Minigun extends GunItem implements GeoItem {
private static final String TAG_HEAT = "heatbar";
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public Minigun() {
@ -109,7 +109,7 @@ public class Minigun extends GunItem implements GeoItem {
LocalPlayer player = Minecraft.getInstance().player;
ItemStack stack = player.getMainHandItem();
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 29) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.minigun.draw"));
@ -125,13 +125,13 @@ public class Minigun extends GunItem implements GeoItem {
private PlayState procedurePredicate(AnimationState 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 (!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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
} else if (this.animationprocedure.equals("empty")) {
} else if (this.animationProcedure.equals("empty")) {
return PlayState.STOP;
}
}

View file

@ -38,7 +38,7 @@ import java.util.function.Consumer;
public class Mk14Item extends GunItem implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public Mk14Item() {
@ -71,7 +71,7 @@ public class Mk14Item extends GunItem implements GeoItem {
LocalPlayer player = Minecraft.getInstance().player;
ItemStack stack = player.getMainHandItem();
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.model.draw"));
@ -108,13 +108,13 @@ public class Mk14Item extends GunItem implements GeoItem {
private PlayState procedurePredicate(AnimationState 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 (!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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
} else if (this.animationprocedure.equals("empty")) {
} else if (this.animationProcedure.equals("empty")) {
return PlayState.STOP;
}
}

View file

@ -39,7 +39,7 @@ import java.util.function.Consumer;
public class RpgItem extends GunItem implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public RpgItem() {
@ -72,7 +72,7 @@ public class RpgItem extends GunItem implements GeoItem {
LocalPlayer player = Minecraft.getInstance().player;
ItemStack stack = player.getMainHandItem();
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.rpg.draw"));
@ -97,13 +97,13 @@ public class RpgItem extends GunItem implements GeoItem {
private PlayState procedurePredicate(AnimationState 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 (!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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
} else if (this.animationprocedure.equals("empty")) {
} else if (this.animationProcedure.equals("empty")) {
return PlayState.STOP;
}
}

View file

@ -38,7 +38,7 @@ import java.util.function.Consumer;
public class RpkItem extends GunItem implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public RpkItem() {
@ -71,7 +71,7 @@ public class RpkItem extends GunItem implements GeoItem {
LocalPlayer player = Minecraft.getInstance().player;
ItemStack stack = player.getMainHandItem();
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak47.draw"));
@ -108,13 +108,13 @@ public class RpkItem extends GunItem implements GeoItem {
private PlayState procedurePredicate(AnimationState 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 (!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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
} else if (this.animationprocedure.equals("empty")) {
} else if (this.animationProcedure.equals("empty")) {
return PlayState.STOP;
}
}

View file

@ -43,7 +43,7 @@ import java.util.function.Consumer;
public class SentinelItem extends GunItem implements GeoItem {
private static final String TAG_POWER = "power";
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public SentinelItem() {
@ -91,7 +91,7 @@ public class SentinelItem extends GunItem implements GeoItem {
LocalPlayer player = Minecraft.getInstance().player;
ItemStack stack = player.getMainHandItem();
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.sentinel.draw"));
@ -136,13 +136,13 @@ public class SentinelItem extends GunItem implements GeoItem {
private PlayState procedurePredicate(AnimationState 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 (!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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
} else if (this.animationprocedure.equals("empty")) {
} else if (this.animationProcedure.equals("empty")) {
return PlayState.STOP;
}
}

View file

@ -37,7 +37,7 @@ import java.util.function.Consumer;
public class SksItem extends GunItem implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public SksItem() {
@ -70,7 +70,7 @@ public class SksItem extends GunItem implements GeoItem {
LocalPlayer player = Minecraft.getInstance().player;
ItemStack stack = player.getMainHandItem();
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.sks.draw"));
@ -99,13 +99,13 @@ public class SksItem extends GunItem implements GeoItem {
private PlayState procedurePredicate(AnimationState 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 (!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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
} else if (this.animationprocedure.equals("empty")) {
} else if (this.animationProcedure.equals("empty")) {
return PlayState.STOP;
}
}

View file

@ -38,7 +38,7 @@ import java.util.function.Consumer;
public class SvdItem extends GunItem implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public SvdItem() {
@ -71,7 +71,7 @@ public class SvdItem extends GunItem implements GeoItem {
LocalPlayer player = Minecraft.getInstance().player;
ItemStack stack = player.getMainHandItem();
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.svd.draw"));
@ -100,13 +100,13 @@ public class SvdItem extends GunItem implements GeoItem {
private PlayState procedurePredicate(AnimationState 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 (!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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
} else if (this.animationprocedure.equals("empty")) {
} else if (this.animationProcedure.equals("empty")) {
return PlayState.STOP;
}
}

View file

@ -39,7 +39,7 @@ import java.util.function.Consumer;
public class Taser extends GunItem implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public Taser() {
@ -73,7 +73,7 @@ public class Taser extends GunItem implements GeoItem {
LocalPlayer player = Minecraft.getInstance().player;
ItemStack stack = player.getMainHandItem();
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 11) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.taser.draw"));
@ -98,10 +98,10 @@ public class Taser extends GunItem implements GeoItem {
private PlayState procedurePredicate(AnimationState 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 (!(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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
}

View file

@ -43,7 +43,7 @@ import java.util.function.Consumer;
public class Trachelium extends GunItem implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public Trachelium() {
@ -75,7 +75,7 @@ public class Trachelium extends GunItem implements GeoItem {
private PlayState idlePredicate(AnimationState<Trachelium> event) {
LocalPlayer player = Minecraft.getInstance().player;
ItemStack stack = player.getMainHandItem();
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 11) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.trachelium.draw"));
@ -100,10 +100,10 @@ public class Trachelium extends GunItem implements GeoItem {
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 (!(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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
}

View file

@ -38,7 +38,7 @@ import java.util.function.Consumer;
public class VectorItem extends GunItem implements GeoItem {
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
public String animationprocedure = "empty";
public String animationProcedure = "empty";
public static ItemDisplayContext transformType;
public VectorItem() {
@ -71,7 +71,7 @@ public class VectorItem extends GunItem implements GeoItem {
LocalPlayer player = Minecraft.getInstance().player;
ItemStack stack = player.getMainHandItem();
if (this.animationprocedure.equals("empty")) {
if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 11) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.vec.draw"));
@ -112,13 +112,13 @@ public class VectorItem extends GunItem implements GeoItem {
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 (!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";
this.animationProcedure = "empty";
event.getController().forceAnimationReset();
}
} else if (this.animationprocedure.equals("empty")) {
} else if (this.animationProcedure.equals("empty")) {
return PlayState.STOP;
}
}