Skip to content

Deal Damage Experience Source

Experience Source puffish_skills:deal_damage gives experience when player deals damage to the other entity.

This Experience Source uses Variables and Calculation.

Operations

Get Player

Operation get_player returns minecraft:player prototype.

Get Weapon Item Stack

Operation get_weapon_item_stack returns minecraft:item_stack prototype.

Get Damaged Living Entity

Operation get_damaged_living_entity returns minecraft:living_entity prototype.

Get Dealt Damage

Operation get_dealt_damage returns puffish_skills:number prototype which represents the amount of dealt damage.

Get Damage Source

Operation get_damage_source returns minecraft:damage_source prototype.

Example

The following experience source gives a player experience value equal to 25% of damage dealth.

Click to view
json
{
	"type": "puffish_skills:deal_damage",
	"data": {
		"variables": {
			"damage": {
				"operations": [
					{
						"type": "get_damage"
					}
				]
			}
		},
		"experience": "damage * 0.25"
	}
}