package Ġio . github . fa ec raft . heart sh aped box . logic . damage . impl Ċ Ċ import Ġio . github . fa ec raft . heart sh aped box . body . Body Part Provider Ċ import Ġio . github . fa ec raft . heart sh aped box . body . BuiltIn Parts Ċ import Ġio . github . fa ec raft . heart sh aped box . logic . damage . Damage Handler Ċ import Ġnet . minecraft . entity . damage . Damage Source Ċ import Ġnet . minecraft . item . ItemStack Ċ import Ġnet . minecraft . server . network . Server Player Entity Ċ Ċ public Ġclass ĠFall ing Block Damage Handler Ġ: ĠDamage Handler Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġshould Handle ( source : ĠDamage Source ): ĠBoolean Ġ= Ġsource . name Ġ== Ġ" an vil " Ġ|| Ġsource . name Ġ== Ġ" fall ing Block " ĊĊĠĠĠ Ġoverride Ġfun Ġget Possible Armor Pieces ( source : ĠDamage Source , Ġplayer : ĠServer Player Entity ): ĠList < ItemStack > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġpossible Ġ= Ġ( player Ġas ĠBody Part Provider ). get OrNull ( BuiltIn Parts . HEAD )?. get A ffect ing Armor ( player ) ĊĠĠĠĠĠĠĠ Ġreturn Ġpossible Ġ?: Ġempty List () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġhandle Damage ( ĊĠĠĠĠĠĠĠ Ġplayer : ĠServer Player Entity , ĊĠĠĠĠĠĠĠ Ġprovider : ĠBody Part Provider , ĊĠĠĠĠĠĠĠ Ġsource : ĠDamage Source , ĊĠĠĠĠĠĠĠ Ġamount : ĠFloat ĊĠĠĠ Ġ): ĠPair < Boolean , ĠFloat > Ġ= Ġfalse Ġto Ġprovider . get OrThrow ( BuiltIn Parts . HEAD ). take Damage ( amount ) Ċ } Ċ