Skip to content

Craft Item Experience Source

Experience Source puffish_skills:craft_item gives experience when player crafts an item.

This Experience Source uses Variables and Calculation.

Operations

Get Player

Operation get_player returns minecraft:player prototype.

Get Crafted Item Stack

Operation get_crafted_item_stack returns minecraft:item_stack prototype.

Example

The following experience source gives the player exactly 5 experience every time the player crafts an iron sword.

Click to view
json
{
	"type": "puffish_skills:craft_item",
	"data": {
		"variables": {
			"is_iron_sword": {
				"operations": [
					{
						"type": "get_crafted_item_stack"
					},
					{
						"type": "puffish_skills:test",
						"data": {
							"item": "minecraft:iron_sword"
						}
					}
				]
			}
		},
		"experience": [
			{
				"condition": "is_iron_sword",
				"expression": "5"
			}
		]
	}
}