package Ġcap it alth ree . sp awner dur ability Ċ Ċ import Ġnet . minecraft . nbt . NBT Tag Compound Ċ Ċ fun ĠN BT Tag Compound . set New Tag Compound ( tag name : ĠString ): ĠN BT Tag Compound Ġ{ ĊĠĠĠ Ġval Ġfresh Ġ= ĠN BT Tag Compound () ĊĠĠĠ Ġset Tag ( tag name , Ġfresh ) ĊĠĠĠ Ġreturn Ġfresh Ċ } Ċ Ċ fun ĠN BT Tag Compound . get OrCreate Compound Tag ( tag name : ĠString ) Ġ= ĊĠĠĠĠĠĠĠ Ġget Tag ( tag name ) Ġas ? ĠN BT Tag Compound Ġ?: Ġset New Tag Compound ( tag name ) Ċ Ċ val ĠFOR GED ATA _ TAG Ġ= Ġ" Forge Data " Ċ val ĠEN CAPS UL ATION _ TAGS Ġ= ĠarrayOf (" Wrapped TE ", Ġ" Wrapped Ent ") Ċ val ĠD UR A _ TAG Ġ= Ġ" Sp awner D ura " Ċ fun Ġget OrCreate D ura Tag ( root : ĠN BT Tag Compound ): ĠN BT Tag Compound Ġ{ ĊĠĠĠ Ġval Ġfor ge dat Ġ= Ġroot . get OrCreate Compound Tag ( FOR GED ATA _ TAG ) ĊĠĠĠ Ġ( forge dat . getTag ( D UR A _ TAG ) Ġas ? ĠN BT Tag Compound )?. let Ġ{ Ġreturn Ġit Ġ} ĊĠĠĠ ĠEN CAPS UL ATION _ TAGS . forEach Ġ{ ĊĠĠĠĠĠĠĠ Ġ( forge dat . get Compound Tag ( it ). getTag ( D UR A _ TAG ) Ġas ? ĠN BT Tag Compound )?. let Ġ{ Ġreturn Ġit Ġ} ĊĠĠĠ Ġ} ĊĠĠĠ Ġreturn Ġroot . set New Tag Compound ( D UR A _ TAG ) Ċ }