ObjectRef punch - Uberi/MineTest-API GitHub Wiki

ObjectRef:punch

Description

puncher = an another ObjectRef,

time_from_last_punch = time since last punch action of the puncher

direction: can be nil

Syntax

punch([ObjectRef](../type/ObjectRef.html) puncher, [float](../type/float.html) time_from_last_punch, [tool_capabilities](../type/tool_capabilities.html) tool_capabilities, [radians](../type/radians.html) direction)

Examples

object:punch(currentplayer, 1.0, {
	full_punch_interval=1.0,
	groupcaps={
		fleshy={times={[1]=1.0, [2]=0.5, [3]=0.3}},
		snappy={times={[1]=1.5, [2]=0.7, [3]=0.4}},
	}
})
⚠️ **GitHub.com Fallback** ⚠️