规范animationProcedure命名
This commit is contained in:
parent
ee43a1d262
commit
367fa59ff9
27 changed files with 238 additions and 233 deletions
|
@ -6,6 +6,8 @@ import net.mcreator.target.item.gun.*;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.renderer.ItemInHandRenderer;
|
import net.minecraft.client.renderer.ItemInHandRenderer;
|
||||||
import net.minecraft.world.item.ArmorItem;
|
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.event.TickEvent;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
|
@ -27,139 +29,142 @@ public class ItemAnimationFactory {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void animatedItems(TickEvent.PlayerTickEvent event) {
|
public static void animatedItems(TickEvent.PlayerTickEvent event) {
|
||||||
String animation = "";
|
String animation;
|
||||||
if (event.phase == TickEvent.Phase.START && (event.player.getMainHandItem().getItem() instanceof GeoItem || event.player.getOffhandItem().getItem() instanceof GeoItem)) {
|
ItemStack mainHandItemStack = event.player.getMainHandItem();
|
||||||
if (!event.player.getMainHandItem().getOrCreateTag().getString("geckoAnim").isEmpty() && !(event.player.getMainHandItem().getItem() instanceof ArmorItem)) {
|
Item mainHandItem = mainHandItemStack.getItem();
|
||||||
animation = event.player.getMainHandItem().getOrCreateTag().getString("geckoAnim");
|
if (event.phase == TickEvent.Phase.START && (mainHandItem instanceof GeoItem || event.player.getOffhandItem().getItem() instanceof GeoItem)) {
|
||||||
event.player.getMainHandItem().getOrCreateTag().putString("geckoAnim", "");
|
if (!mainHandItemStack.getOrCreateTag().getString("geckoAnim").isEmpty() && !(mainHandItem instanceof ArmorItem)) {
|
||||||
if (event.player.getMainHandItem().getItem() instanceof Taser animatable)
|
animation = mainHandItemStack.getOrCreateTag().getString("geckoAnim");
|
||||||
|
mainHandItemStack.getOrCreateTag().putString("geckoAnim", "");
|
||||||
|
|
||||||
|
if (mainHandItem instanceof Taser animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof Abekiri animatable)
|
if (mainHandItem instanceof Abekiri animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof Trachelium animatable)
|
if (mainHandItem instanceof Trachelium animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof VectorItem animatable)
|
if (mainHandItem instanceof VectorItem animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof AK47Item animatable)
|
if (mainHandItem instanceof AK47Item animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof SksItem animatable)
|
if (mainHandItem instanceof SksItem animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof M4Item animatable)
|
if (mainHandItem instanceof M4Item animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof Hk416Item animatable)
|
if (mainHandItem instanceof Hk416Item animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof Mk14Item animatable)
|
if (mainHandItem instanceof Mk14Item animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof MarlinItem animatable)
|
if (mainHandItem instanceof MarlinItem animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof SvdItem animatable)
|
if (mainHandItem instanceof SvdItem animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof M98bItem animatable)
|
if (mainHandItem instanceof M98bItem animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof SentinelItem animatable)
|
if (mainHandItem instanceof SentinelItem animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof HuntingRifle animatable)
|
if (mainHandItem instanceof HuntingRifle animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof Kraber animatable)
|
if (mainHandItem instanceof Kraber animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof M870Item animatable)
|
if (mainHandItem instanceof M870Item animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof Aa12Item animatable)
|
if (mainHandItem instanceof Aa12Item animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof Devotion animatable)
|
if (mainHandItem instanceof Devotion animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof RpkItem animatable)
|
if (mainHandItem instanceof RpkItem animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof M60Item animatable)
|
if (mainHandItem instanceof M60Item animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof Minigun animatable)
|
if (mainHandItem instanceof Minigun animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof M79Item animatable)
|
if (mainHandItem instanceof M79Item animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof RpgItem animatable)
|
if (mainHandItem instanceof RpgItem animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof BocekItem animatable)
|
if (mainHandItem instanceof BocekItem animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof LightSaberItem animatable)
|
if (mainHandItem instanceof LightSaberItem animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getMainHandItem().getItem() instanceof Rocket animatable)
|
if (mainHandItem instanceof Rocket animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -168,132 +173,132 @@ public class ItemAnimationFactory {
|
||||||
event.player.getOffhandItem().getOrCreateTag().putString("geckoAnim", "");
|
event.player.getOffhandItem().getOrCreateTag().putString("geckoAnim", "");
|
||||||
if (event.player.getOffhandItem().getItem() instanceof Taser animatable)
|
if (event.player.getOffhandItem().getItem() instanceof Taser animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof Abekiri animatable)
|
if (event.player.getOffhandItem().getItem() instanceof Abekiri animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof Trachelium animatable)
|
if (event.player.getOffhandItem().getItem() instanceof Trachelium animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof VectorItem animatable)
|
if (event.player.getOffhandItem().getItem() instanceof VectorItem animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof AK47Item animatable)
|
if (event.player.getOffhandItem().getItem() instanceof AK47Item animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof SksItem animatable)
|
if (event.player.getOffhandItem().getItem() instanceof SksItem animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof M4Item animatable)
|
if (event.player.getOffhandItem().getItem() instanceof M4Item animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof Hk416Item animatable)
|
if (event.player.getOffhandItem().getItem() instanceof Hk416Item animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof Mk14Item animatable)
|
if (event.player.getOffhandItem().getItem() instanceof Mk14Item animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof MarlinItem animatable)
|
if (event.player.getOffhandItem().getItem() instanceof MarlinItem animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof SvdItem animatable)
|
if (event.player.getOffhandItem().getItem() instanceof SvdItem animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof M98bItem animatable)
|
if (event.player.getOffhandItem().getItem() instanceof M98bItem animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof SentinelItem animatable)
|
if (event.player.getOffhandItem().getItem() instanceof SentinelItem animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof HuntingRifle animatable)
|
if (event.player.getOffhandItem().getItem() instanceof HuntingRifle animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof Kraber animatable)
|
if (event.player.getOffhandItem().getItem() instanceof Kraber animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof M870Item animatable)
|
if (event.player.getOffhandItem().getItem() instanceof M870Item animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof Aa12Item animatable)
|
if (event.player.getOffhandItem().getItem() instanceof Aa12Item animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof Devotion animatable)
|
if (event.player.getOffhandItem().getItem() instanceof Devotion animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof RpkItem animatable)
|
if (event.player.getOffhandItem().getItem() instanceof RpkItem animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof M60Item animatable)
|
if (event.player.getOffhandItem().getItem() instanceof M60Item animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof Minigun animatable)
|
if (event.player.getOffhandItem().getItem() instanceof Minigun animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof M79Item animatable)
|
if (event.player.getOffhandItem().getItem() instanceof M79Item animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof RpgItem animatable)
|
if (event.player.getOffhandItem().getItem() instanceof RpgItem animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof BocekItem animatable)
|
if (event.player.getOffhandItem().getItem() instanceof BocekItem animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof LightSaberItem animatable)
|
if (event.player.getOffhandItem().getItem() instanceof LightSaberItem animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
if (event.player.getOffhandItem().getItem() instanceof Rocket animatable)
|
if (event.player.getOffhandItem().getItem() instanceof Rocket animatable)
|
||||||
if (event.player.level().isClientSide()) {
|
if (event.player.level().isClientSide()) {
|
||||||
animatable.animationprocedure = animation;
|
animatable.animationProcedure = animation;
|
||||||
disableUseAnim();
|
disableUseAnim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class LightSaberItem extends SwordItem implements GeoItem {
|
public class LightSaberItem extends SwordItem implements GeoItem {
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public LightSaberItem() {
|
public LightSaberItem() {
|
||||||
|
@ -56,7 +56,7 @@ public class LightSaberItem extends SwordItem implements GeoItem {
|
||||||
|
|
||||||
private PlayState idlePredicate(AnimationState event) {
|
private PlayState idlePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenLoop("animation.lightsaber.idle"));
|
event.getController().setAnimation(RawAnimation.begin().thenLoop("animation.lightsaber.idle"));
|
||||||
return PlayState.CONTINUE;
|
return PlayState.CONTINUE;
|
||||||
}
|
}
|
||||||
|
@ -66,13 +66,13 @@ public class LightSaberItem extends SwordItem implements GeoItem {
|
||||||
|
|
||||||
private PlayState procedurePredicate(AnimationState event) {
|
private PlayState procedurePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!this.animationprocedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
} else if (this.animationprocedure.equals("empty")) {
|
} else if (this.animationProcedure.equals("empty")) {
|
||||||
return PlayState.STOP;
|
return PlayState.STOP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class Rocket extends Item implements GeoItem {
|
public class Rocket extends Item implements GeoItem {
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public Rocket() {
|
public Rocket() {
|
||||||
|
@ -54,7 +54,7 @@ public class Rocket extends Item implements GeoItem {
|
||||||
|
|
||||||
private PlayState idlePredicate(AnimationState event) {
|
private PlayState idlePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenLoop("animation.rpg.idle"));
|
event.getController().setAnimation(RawAnimation.begin().thenLoop("animation.rpg.idle"));
|
||||||
return PlayState.CONTINUE;
|
return PlayState.CONTINUE;
|
||||||
}
|
}
|
||||||
|
@ -64,13 +64,13 @@ public class Rocket extends Item implements GeoItem {
|
||||||
|
|
||||||
private PlayState procedurePredicate(AnimationState event) {
|
private PlayState procedurePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!this.animationprocedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
} else if (this.animationprocedure.equals("empty")) {
|
} else if (this.animationProcedure.equals("empty")) {
|
||||||
return PlayState.STOP;
|
return PlayState.STOP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class AK47Item extends GunItem implements GeoItem {
|
public class AK47Item extends GunItem implements GeoItem {
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public AK47Item() {
|
public AK47Item() {
|
||||||
|
@ -70,7 +70,7 @@ public class AK47Item extends GunItem implements GeoItem {
|
||||||
LocalPlayer player = Minecraft.getInstance().player;
|
LocalPlayer player = Minecraft.getInstance().player;
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak47.draw"));
|
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) {
|
private PlayState procedurePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!this.animationprocedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
} else if (this.animationprocedure.equals("empty")) {
|
} else if (this.animationProcedure.equals("empty")) {
|
||||||
return PlayState.STOP;
|
return PlayState.STOP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class Aa12Item extends GunItem implements GeoItem {
|
public class Aa12Item extends GunItem implements GeoItem {
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public Aa12Item() {
|
public Aa12Item() {
|
||||||
|
@ -76,7 +76,7 @@ public class Aa12Item extends GunItem implements GeoItem {
|
||||||
LocalPlayer player = Minecraft.getInstance().player;
|
LocalPlayer player = Minecraft.getInstance().player;
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.aa12.draw"));
|
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) {
|
private PlayState procedurePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!this.animationprocedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
} else if (this.animationprocedure.equals("empty")) {
|
} else if (this.animationProcedure.equals("empty")) {
|
||||||
return PlayState.STOP;
|
return PlayState.STOP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class Abekiri extends GunItem implements GeoItem {
|
public class Abekiri extends GunItem implements GeoItem {
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public Abekiri() {
|
public Abekiri() {
|
||||||
|
@ -72,7 +72,7 @@ public class Abekiri extends GunItem implements GeoItem {
|
||||||
LocalPlayer player = Minecraft.getInstance().player;
|
LocalPlayer player = Minecraft.getInstance().player;
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("drawtime") < 11) {
|
if (stack.getOrCreateTag().getDouble("drawtime") < 11) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ab.draw"));
|
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) {
|
private PlayState procedurePredicate(AnimationState event) {
|
||||||
if (transformType != null) {
|
if (transformType != null) {
|
||||||
if (!(this.animationprocedure.equals("empty")) && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!(this.animationProcedure.equals("empty")) && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class BocekItem extends GunItem implements GeoItem {
|
public class BocekItem extends GunItem implements GeoItem {
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public BocekItem() {
|
public BocekItem() {
|
||||||
|
@ -76,7 +76,7 @@ public class BocekItem extends GunItem implements GeoItem {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.bocek.draw"));
|
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"));
|
event.getController().setAnimation(RawAnimation.begin().thenLoop("animation.bocek.idle"));
|
||||||
return PlayState.CONTINUE;
|
return PlayState.CONTINUE;
|
||||||
}
|
}
|
||||||
|
@ -86,13 +86,13 @@ public class BocekItem extends GunItem implements GeoItem {
|
||||||
|
|
||||||
private PlayState procedurePredicate(AnimationState event) {
|
private PlayState procedurePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!this.animationprocedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
} else if (this.animationprocedure.equals("empty")) {
|
} else if (this.animationProcedure.equals("empty")) {
|
||||||
return PlayState.STOP;
|
return PlayState.STOP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class Devotion extends GunItem implements GeoItem {
|
public class Devotion extends GunItem implements GeoItem {
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public Devotion() {
|
public Devotion() {
|
||||||
|
@ -71,7 +71,7 @@ public class Devotion extends GunItem implements GeoItem {
|
||||||
LocalPlayer player = Minecraft.getInstance().player;
|
LocalPlayer player = Minecraft.getInstance().player;
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.devotion.draw"));
|
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) {
|
private PlayState procedurePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!(this.animationprocedure.equals("empty")) && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!(this.animationProcedure.equals("empty")) && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class Hk416Item extends GunItem implements GeoItem {
|
public class Hk416Item extends GunItem implements GeoItem {
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public Hk416Item() {
|
public Hk416Item() {
|
||||||
|
@ -70,7 +70,7 @@ public class Hk416Item extends GunItem implements GeoItem {
|
||||||
LocalPlayer player = Minecraft.getInstance().player;
|
LocalPlayer player = Minecraft.getInstance().player;
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m4.draw"));
|
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) {
|
private PlayState procedurePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!this.animationprocedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
} else if (this.animationprocedure.equals("empty")) {
|
} else if (this.animationProcedure.equals("empty")) {
|
||||||
return PlayState.STOP;
|
return PlayState.STOP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class HuntingRifle extends GunItem implements GeoItem {
|
public class HuntingRifle extends GunItem implements GeoItem {
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public HuntingRifle() {
|
public HuntingRifle() {
|
||||||
|
@ -70,7 +70,7 @@ public class HuntingRifle extends GunItem implements GeoItem {
|
||||||
LocalPlayer player = Minecraft.getInstance().player;
|
LocalPlayer player = Minecraft.getInstance().player;
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.hunting_rifle.draw"));
|
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) {
|
private PlayState procedurePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!(this.animationprocedure.equals("empty")) && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!(this.animationProcedure.equals("empty")) && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class Kraber extends GunItem implements GeoItem {
|
public class Kraber extends GunItem implements GeoItem {
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public Kraber() {
|
public Kraber() {
|
||||||
|
@ -74,7 +74,7 @@ public class Kraber extends GunItem implements GeoItem {
|
||||||
private PlayState idlePredicate(AnimationState event) {
|
private PlayState idlePredicate(AnimationState event) {
|
||||||
LocalPlayer player = Minecraft.getInstance().player;
|
LocalPlayer player = Minecraft.getInstance().player;
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("drawtime") < 29) {
|
if (stack.getOrCreateTag().getDouble("drawtime") < 29) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.kraber.draw"));
|
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) {
|
private PlayState procedurePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!this.animationprocedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
} else if (this.animationprocedure.equals("empty")) {
|
} else if (this.animationProcedure.equals("empty")) {
|
||||||
return PlayState.STOP;
|
return PlayState.STOP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class M4Item extends GunItem implements GeoItem {
|
public class M4Item extends GunItem implements GeoItem {
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public M4Item() {
|
public M4Item() {
|
||||||
|
@ -70,7 +70,7 @@ public class M4Item extends GunItem implements GeoItem {
|
||||||
LocalPlayer player = Minecraft.getInstance().player;
|
LocalPlayer player = Minecraft.getInstance().player;
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m4.draw"));
|
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) {
|
private PlayState procedurePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!this.animationprocedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
} else if (this.animationprocedure.equals("empty")) {
|
} else if (this.animationProcedure.equals("empty")) {
|
||||||
return PlayState.STOP;
|
return PlayState.STOP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class M60Item extends GunItem implements GeoItem {
|
public class M60Item extends GunItem implements GeoItem {
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public M60Item() {
|
public M60Item() {
|
||||||
|
@ -71,7 +71,7 @@ public class M60Item extends GunItem implements GeoItem {
|
||||||
LocalPlayer player = Minecraft.getInstance().player;
|
LocalPlayer player = Minecraft.getInstance().player;
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("drawtime") < 29) {
|
if (stack.getOrCreateTag().getDouble("drawtime") < 29) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m60.draw"));
|
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) {
|
private PlayState procedurePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!this.animationprocedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
} else if (this.animationprocedure.equals("empty")) {
|
} else if (this.animationProcedure.equals("empty")) {
|
||||||
return PlayState.STOP;
|
return PlayState.STOP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class M79Item extends GunItem implements GeoItem {
|
public class M79Item extends GunItem implements GeoItem {
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public M79Item() {
|
public M79Item() {
|
||||||
|
@ -71,7 +71,7 @@ public class M79Item extends GunItem implements GeoItem {
|
||||||
LocalPlayer player = Minecraft.getInstance().player;
|
LocalPlayer player = Minecraft.getInstance().player;
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m79.draw"));
|
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) {
|
private PlayState procedurePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!(this.animationprocedure.equals("empty")) && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!(this.animationProcedure.equals("empty")) && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class M870Item extends GunItem implements GeoItem {
|
public class M870Item extends GunItem implements GeoItem {
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public M870Item() {
|
public M870Item() {
|
||||||
|
@ -74,7 +74,7 @@ public class M870Item extends GunItem implements GeoItem {
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m870.draw"));
|
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) {
|
private PlayState procedurePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!this.animationprocedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
} else if (this.animationprocedure.equals("empty")) {
|
} else if (this.animationProcedure.equals("empty")) {
|
||||||
return PlayState.STOP;
|
return PlayState.STOP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class M98bItem extends GunItem implements GeoItem {
|
public class M98bItem extends GunItem implements GeoItem {
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public M98bItem() {
|
public M98bItem() {
|
||||||
|
@ -70,7 +70,7 @@ public class M98bItem extends GunItem implements GeoItem {
|
||||||
LocalPlayer player = Minecraft.getInstance().player;
|
LocalPlayer player = Minecraft.getInstance().player;
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m98b.draw"));
|
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) {
|
private PlayState procedurePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!this.animationprocedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
} else if (this.animationprocedure.equals("empty")) {
|
} else if (this.animationProcedure.equals("empty")) {
|
||||||
return PlayState.STOP;
|
return PlayState.STOP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class MarlinItem extends GunItem implements GeoItem {
|
public class MarlinItem extends GunItem implements GeoItem {
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public MarlinItem() {
|
public MarlinItem() {
|
||||||
|
@ -73,7 +73,7 @@ public class MarlinItem extends GunItem implements GeoItem {
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.marlin.draw"));
|
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) {
|
private PlayState procedurePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!this.animationprocedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
} else if (this.animationprocedure.equals("empty")) {
|
} else if (this.animationProcedure.equals("empty")) {
|
||||||
return PlayState.STOP;
|
return PlayState.STOP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ import java.util.function.Consumer;
|
||||||
public class Minigun extends GunItem implements GeoItem {
|
public class Minigun extends GunItem implements GeoItem {
|
||||||
private static final String TAG_HEAT = "heatbar";
|
private static final String TAG_HEAT = "heatbar";
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public Minigun() {
|
public Minigun() {
|
||||||
|
@ -109,7 +109,7 @@ public class Minigun extends GunItem implements GeoItem {
|
||||||
LocalPlayer player = Minecraft.getInstance().player;
|
LocalPlayer player = Minecraft.getInstance().player;
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("drawtime") < 29) {
|
if (stack.getOrCreateTag().getDouble("drawtime") < 29) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.minigun.draw"));
|
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) {
|
private PlayState procedurePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!this.animationprocedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
} else if (this.animationprocedure.equals("empty")) {
|
} else if (this.animationProcedure.equals("empty")) {
|
||||||
return PlayState.STOP;
|
return PlayState.STOP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class Mk14Item extends GunItem implements GeoItem {
|
public class Mk14Item extends GunItem implements GeoItem {
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public Mk14Item() {
|
public Mk14Item() {
|
||||||
|
@ -71,7 +71,7 @@ public class Mk14Item extends GunItem implements GeoItem {
|
||||||
LocalPlayer player = Minecraft.getInstance().player;
|
LocalPlayer player = Minecraft.getInstance().player;
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.model.draw"));
|
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) {
|
private PlayState procedurePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!this.animationprocedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
} else if (this.animationprocedure.equals("empty")) {
|
} else if (this.animationProcedure.equals("empty")) {
|
||||||
return PlayState.STOP;
|
return PlayState.STOP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class RpgItem extends GunItem implements GeoItem {
|
public class RpgItem extends GunItem implements GeoItem {
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public RpgItem() {
|
public RpgItem() {
|
||||||
|
@ -72,7 +72,7 @@ public class RpgItem extends GunItem implements GeoItem {
|
||||||
LocalPlayer player = Minecraft.getInstance().player;
|
LocalPlayer player = Minecraft.getInstance().player;
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.rpg.draw"));
|
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) {
|
private PlayState procedurePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!this.animationprocedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
} else if (this.animationprocedure.equals("empty")) {
|
} else if (this.animationProcedure.equals("empty")) {
|
||||||
return PlayState.STOP;
|
return PlayState.STOP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class RpkItem extends GunItem implements GeoItem {
|
public class RpkItem extends GunItem implements GeoItem {
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public RpkItem() {
|
public RpkItem() {
|
||||||
|
@ -71,7 +71,7 @@ public class RpkItem extends GunItem implements GeoItem {
|
||||||
LocalPlayer player = Minecraft.getInstance().player;
|
LocalPlayer player = Minecraft.getInstance().player;
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak47.draw"));
|
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) {
|
private PlayState procedurePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!this.animationprocedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
} else if (this.animationprocedure.equals("empty")) {
|
} else if (this.animationProcedure.equals("empty")) {
|
||||||
return PlayState.STOP;
|
return PlayState.STOP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ import java.util.function.Consumer;
|
||||||
public class SentinelItem extends GunItem implements GeoItem {
|
public class SentinelItem extends GunItem implements GeoItem {
|
||||||
private static final String TAG_POWER = "power";
|
private static final String TAG_POWER = "power";
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public SentinelItem() {
|
public SentinelItem() {
|
||||||
|
@ -91,7 +91,7 @@ public class SentinelItem extends GunItem implements GeoItem {
|
||||||
LocalPlayer player = Minecraft.getInstance().player;
|
LocalPlayer player = Minecraft.getInstance().player;
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.sentinel.draw"));
|
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) {
|
private PlayState procedurePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!this.animationprocedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
} else if (this.animationprocedure.equals("empty")) {
|
} else if (this.animationProcedure.equals("empty")) {
|
||||||
return PlayState.STOP;
|
return PlayState.STOP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class SksItem extends GunItem implements GeoItem {
|
public class SksItem extends GunItem implements GeoItem {
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public SksItem() {
|
public SksItem() {
|
||||||
|
@ -70,7 +70,7 @@ public class SksItem extends GunItem implements GeoItem {
|
||||||
LocalPlayer player = Minecraft.getInstance().player;
|
LocalPlayer player = Minecraft.getInstance().player;
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.sks.draw"));
|
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) {
|
private PlayState procedurePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!this.animationprocedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
} else if (this.animationprocedure.equals("empty")) {
|
} else if (this.animationProcedure.equals("empty")) {
|
||||||
return PlayState.STOP;
|
return PlayState.STOP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class SvdItem extends GunItem implements GeoItem {
|
public class SvdItem extends GunItem implements GeoItem {
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public SvdItem() {
|
public SvdItem() {
|
||||||
|
@ -71,7 +71,7 @@ public class SvdItem extends GunItem implements GeoItem {
|
||||||
LocalPlayer player = Minecraft.getInstance().player;
|
LocalPlayer player = Minecraft.getInstance().player;
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
if (stack.getOrCreateTag().getDouble("drawtime") < 16) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.svd.draw"));
|
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) {
|
private PlayState procedurePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!this.animationprocedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
} else if (this.animationprocedure.equals("empty")) {
|
} else if (this.animationProcedure.equals("empty")) {
|
||||||
return PlayState.STOP;
|
return PlayState.STOP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class Taser extends GunItem implements GeoItem {
|
public class Taser extends GunItem implements GeoItem {
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public Taser() {
|
public Taser() {
|
||||||
|
@ -73,7 +73,7 @@ public class Taser extends GunItem implements GeoItem {
|
||||||
LocalPlayer player = Minecraft.getInstance().player;
|
LocalPlayer player = Minecraft.getInstance().player;
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("drawtime") < 11) {
|
if (stack.getOrCreateTag().getDouble("drawtime") < 11) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.taser.draw"));
|
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) {
|
private PlayState procedurePredicate(AnimationState event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!(this.animationprocedure.equals("empty")) && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!(this.animationProcedure.equals("empty")) && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class Trachelium extends GunItem implements GeoItem {
|
public class Trachelium extends GunItem implements GeoItem {
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public Trachelium() {
|
public Trachelium() {
|
||||||
|
@ -75,7 +75,7 @@ public class Trachelium extends GunItem implements GeoItem {
|
||||||
private PlayState idlePredicate(AnimationState<Trachelium> event) {
|
private PlayState idlePredicate(AnimationState<Trachelium> event) {
|
||||||
LocalPlayer player = Minecraft.getInstance().player;
|
LocalPlayer player = Minecraft.getInstance().player;
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("drawtime") < 11) {
|
if (stack.getOrCreateTag().getDouble("drawtime") < 11) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.trachelium.draw"));
|
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) {
|
private PlayState procedurePredicate(AnimationState<Trachelium> event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!(this.animationprocedure.equals("empty")) && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!(this.animationProcedure.equals("empty")) && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class VectorItem extends GunItem implements GeoItem {
|
public class VectorItem extends GunItem implements GeoItem {
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
public String animationprocedure = "empty";
|
public String animationProcedure = "empty";
|
||||||
public static ItemDisplayContext transformType;
|
public static ItemDisplayContext transformType;
|
||||||
|
|
||||||
public VectorItem() {
|
public VectorItem() {
|
||||||
|
@ -71,7 +71,7 @@ public class VectorItem extends GunItem implements GeoItem {
|
||||||
LocalPlayer player = Minecraft.getInstance().player;
|
LocalPlayer player = Minecraft.getInstance().player;
|
||||||
ItemStack stack = player.getMainHandItem();
|
ItemStack stack = player.getMainHandItem();
|
||||||
|
|
||||||
if (this.animationprocedure.equals("empty")) {
|
if (this.animationProcedure.equals("empty")) {
|
||||||
|
|
||||||
if (stack.getOrCreateTag().getDouble("drawtime") < 11) {
|
if (stack.getOrCreateTag().getDouble("drawtime") < 11) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.vec.draw"));
|
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) {
|
private PlayState procedurePredicate(AnimationState<VectorItem> event) {
|
||||||
if (transformType != null && transformType.firstPerson()) {
|
if (transformType != null && transformType.firstPerson()) {
|
||||||
if (!this.animationprocedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (!this.animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationprocedure));
|
event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure));
|
||||||
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
if (event.getController().getAnimationState() == AnimationController.State.STOPPED) {
|
||||||
this.animationprocedure = "empty";
|
this.animationProcedure = "empty";
|
||||||
event.getController().forceAnimationReset();
|
event.getController().forceAnimationReset();
|
||||||
}
|
}
|
||||||
} else if (this.animationprocedure.equals("empty")) {
|
} else if (this.animationProcedure.equals("empty")) {
|
||||||
return PlayState.STOP;
|
return PlayState.STOP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue