Skip to content

Get Effect Operation

Converts minecraft:living_entity prototype into minecraft:status_effect_instance prototype such that it represents the instance of given effect. If the target has no effect returns nothing.

Examples

The operation is used to get effect luck on the player and then the level of it, such that the experience source gives extra experience every time player kill entity.

Click to view
json
{
	"type": "puffish_skills:kill_entity",
	"data": {
		"variables": {
			"luck_level": {
				"operations": [
					{
						"type": "get_player"
					},
					{
						"type": "as_living_entity"
					},
					{ 
						"type": "puffish_skills:effect",
						"data": {
							"effect": "luck"
						}
					},
					{
						"type": "get_level"
					}
				],
				"fallback": 0
			},
			"dropped_experience": {
				"operations": [
					{
						"type": "get_dropped_experience"
					}
				]
			},
		},
		"experience": "dropped_experience + luck_level * dropped_experience"
	}
}

JSON structure

PropertyTypeRequired
effecteffect identifieryes