Section 5: Advanced functions and JSON

Only for advanced users

How does an emote.json look like?

{
	"name": "Name",
	"author": "Author",
	"description": "this is an example emote",
	"you can add": "comment like this",
	"emote":{
	...
}

In the file you have the base info like name, description... you can add comments to the file unlike the most JSON file, the mod will warn for every unknown block except "comment" but won't fail

"emote":{
    "isLoop": "false",
    "returnTick": 2,
		"beginTick":12,
		"endTick":70,
		"stopTick":75,
		"degrees":true,
		"moves":[
		...
		]
	}

In the emote block there is the basic info, like the length the endTick and the stopTick mean the time where the player will reset their pose smooth. the begin tick is the same from tick 0.

You can loop the emote, with turning the isLoop true and set the returnTick. It will return from the endTick to returnTick. returnTick have to be smaller than endTick

degrees: the rotation values are in degrees or radian

			{
				"tick":12,
				"turn": 0,
				"easing": "InOutSine",
				"head":{
					"yaw":-96
				}
			},

the keyframe. turn generates a new keyframe after this in the same tick, with rotated turn amount of full turns. The same solution can be produced with Constant easing

the tick show the keyframe's location in MC time (20 ticks = 1 second)

The easing is the easing method after this frame. Easings are from https://easings.net/# + linear + constant you can use capital letters, you can write with ease or without. Both are correct :

easeinoutsine
InoUtSInE

parts: head, torso, leftLeg, rightLeg, leftArm, rightArm.

value types: x, y, z, pitch, yaw, roll, bend, axis

To bend something, add a bend value. The head does not support bending...

The head, legs and arms location is relative to the torso's location and rotation

{
	"name": "Name",
	"author": "Author",
	"description": "this is an example emote",
	"you can add": "comment like this",
	"emote":{
		"beginTick":12,
		"endTick":70,
		"stopTick":75,
		"degrees":true,
		"moves":[
			{
				"tick":12,
				"easing": "InOutSine",
				"head":{
					"yaw":-96
				}
			},
			{
				"tick": 45,
				"easing": "linear",
				"turn": -10,
				"comment": "after tick 45 the right arm's yaw will set back with a full turn",
				"head": {
					"yaw": 3663,
					"comment": "you cannot define a value for the same tick twice (in this case pitch)"
				}
			}
		]
	}
}

Last updated