mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-22 21:20:12 +00:00
Model animation system.
Main things of interest:
* IAnimationStateMachine - state machine for animations; can load
from json.
* AnimationTESR - automatic TESR for animated models.
* AnimationModelBase - same for entities.
* ITimeValue - time-varying value, used to control animation
parameters from code.
* TESRs can now be batched - look at TESR.renderTileEntityFast +
TE.hasFastRenderer.
* RegionRenderCache is not accessible to TESRs and other client-side
logic - MinecraftForgeClient.getRegionRenderCache.
This commit is contained in:
1 parent
e9a86f27fb
commit
0710bdf3f5
44 files changed
+3185
-252
No files matched your search
@@ -0,0 +1,36 @@
|
||||
package net.minecraftforge.common.model.animation;
|
||||
|
||||
import net.minecraftforge.client.model.IModelState;
|
||||
import net.minecraftforge.client.model.animation.Event;
|
||||
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
/**
|
||||
* State machine representing the model animation.
|
||||
*/
|
||||
public interface IAnimationStateMachine
|
||||
{
|
||||
/**
|
||||
* Sample the state and events at the current time.
|
||||
* Event iterable will contain all events that happened from the last invocation of this method, from most to least recent.
|
||||
* Event offset is relative to the previous event, and for the first event it's relative to the current time.
|
||||
*/
|
||||
Pair<IModelState, Iterable<Event>> apply(float time);
|
||||
|
||||
/**
|
||||
* Transition to a new state.
|
||||
*/
|
||||
void transition(String newState);
|
||||
|
||||
/**
|
||||
* Get current state name.
|
||||
*/
|
||||
String currentState();
|
||||
|
||||
/**
|
||||
* Set to true if the machine should handle special events that come from the clips (they start with '!').
|
||||
* Right now only implemented event is "!transition:<state_name>".
|
||||
* Default value is true.
|
||||
*/
|
||||
void shouldHandleSpecialEvents(boolean value);
|
||||
}
|
||||
Reference in new issue
Block a user