@Deprecated public AnimationStateMachine(ImmutableMap<String, ITimeValue> parameters, ImmutableMap<String, IClip> clips, ImmutableList<String> states, ImmutableMap<String, String> transitions, String startState) { this(parameters, clips, states, ImmutableMultimap.copyOf(Multimaps.newSetMultimap(Maps.transformValues(transitions, new Function<String, Collection<String>>() { public Collection<String> apply(String input) { return ImmutableSet.of(input); } }), new Supplier<Set<String>>() { public Set<String> get() { return Sets.newHashSet(); } })), startState); }
public SlerpClip(IClip from, IClip to, ITimeValue input, ITimeValue progress) { this.from = from; this.to = to; this.input = input; this.progress = progress; }
private static IJointClip blendClips(final IJoint joint, final IJointClip fromClip, final IJointClip toClip, final ITimeValue input, final ITimeValue progress) { return new IJointClip() { public TRSRTransformation apply(float time) { float clipTime = input.apply(time); return fromClip.apply(clipTime).slerp(toClip.apply(clipTime), MathHelper.clamp_float(progress.apply(time), 0, 1)); } }; }
public AnimationStateMachine(ImmutableMap<String, ITimeValue> parameters, ImmutableMap<String, IClip> clips, ImmutableList<String> states, ImmutableMultimap<String, String> transitions, String startState) { this.parameters = parameters; this.clips = clips; this.states = states; this.transitions = transitions; this.startState = startState; }
public ITimeValue apply(String name) { if(asm.parameters.containsKey(name)) { return asm.parameters.get(name); } return customParameters.get(name); }
@Override public ImmutableMap<String, ITimeValue> getAnimationParameters(ItemStack stack, World world, EntityLivingBase entity) { return this.delegate(stack, i -> i.getAnimationParameters(stack, world, entity), () -> super.getAnimationParameters(stack, world, entity)); }
public static IAnimationStateMachine loadASM(ResourceLocation location, ImmutableMap<String, ITimeValue> customParameters) { return AnimationStateMachine.load(manager, location, customParameters); }
public TimeClip(IClip childClip, ITimeValue time) { this.childClip = childClip; this.time = time; }
public TriggerClip(IClip clip, ITimeValue parameter, String event) { this.clip = clip; this.parameter = parameter; this.event = event; }
public ParameterResolver(ImmutableMap<String, ITimeValue> customParameters) { this.customParameters = customParameters; }
public TileEntityPaintMixer() { inventory.addCallback(this); this.asm = OpenMods.proxy.loadAsm(OpenBlocks.location("asms/block/paint_mixer.json"), ImmutableMap.<String, ITimeValue> of()); }
public TileEntityProjector() { this.asm = OpenMods.proxy.loadAsm(OpenBlocks.location("asms/block/projector.json"), ImmutableMap.<String, ITimeValue> of("last_change", lastChange)); }
@Override public IAnimationStateMachine loadAsm(ResourceLocation location, ImmutableMap<String, ITimeValue> parameters) { return ModelLoaderRegistry.loadASM(location, parameters); }
@Override public IAnimationStateMachine loadAsm(ResourceLocation location, ImmutableMap<String, ITimeValue> parameters) { return null; }
public IAnimationStateMachine loadAsm(ResourceLocation location, ImmutableMap<String, ITimeValue> parameters);