package Ġcom . the only t ails . ruby mod . entities Ċ Ċ import Ġcom . the only t ails . ruby mod . id Ċ import Ġcom . the only t ails . ruby mod . regist ries . Block Registry Ċ import Ġcom . the only t ails . ruby mod . regist ries . Item Registry Ċ import Ġnet . minecraft . block . BlockState Ċ import Ġnet . minecraft . entity . Entity Data Ċ import Ġnet . minecraft . entity . EntityType Ċ import Ġnet . minecraft . entity . Spawn Reason Ċ import Ġnet . minecraft . entity . ai . goal .* Ċ import Ġnet . minecraft . entity . attribute . Default Attribute Container Ċ import Ġnet . minecraft . entity . attribute . Entity Attributes Ċ import Ġnet . minecraft . entity . damage . Damage Source Ċ import Ġnet . minecraft . entity . mob . Mob Entity Ċ import Ġnet . minecraft . entity . passive . Animal Entity Ċ import Ġnet . minecraft . entity . passive . She ep Entity Ċ import Ġnet . minecraft . entity . player . Player Entity Ċ import Ġnet . minecraft . item . Items Ċ import Ġnet . minecraft . nbt . Compound Tag Ċ import Ġnet . minecraft . recipe . Ingredient Ċ import Ġnet . minecraft . sound . Sound Category Ċ import Ġnet . minecraft . sound . Sound Event Ċ import Ġnet . minecraft . sound . Sound Events Ċ import Ġnet . minecraft . util . D ye Color Ċ import Ġnet . minecraft . util . Identifier Ċ import Ġnet . minecraft . util . math . Block Pos Ċ import Ġnet . minecraft . world . Local Difficulty Ċ import Ġnet . minecraft . world . Server World Access Ċ import Ġnet . minecraft . world . World Ċ Ċ class ĠRuby She ep Entity ( type : ĠEntityType < out ĠShe ep Entity ? >, Ġworld In : ĠWorld ) Ġ: ĠShe ep Entity ( type , Ġworld In ) Ġ{ Ċ ĉ private Ġlateinit Ġvar Ġeat Gr ass Goal : ĠE at Gr ass Goal Ċ ĉ private Ġvar Ġruby She ep Timer Ġ= Ġ 0 ĊĊ ĉ override Ġfun Ġinit Go als () Ġ{ Ċĉ ĉ super . init Go als () ĊĊĉ ĉ eat Gr ass Goal Ġ= ĠE at Gr ass Goal ( this ) ĊĊĉ ĉ goal Selector . add ( 0 , ĠSw im Goal ( this )) Ċĉ ĉ goal Selector . add ( 1 , ĠE scape D anger Goal ( this , Ġ 1 . 2 5 )) Ċĉ ĉ goal Selector . add ( 2 , ĠAnimal M ate Goal ( this , Ġ 1 . 0 )) Ċĉ ĉ goal Selector . add ( 2 , ĠAnimal M ate Goal ( this , Ġ 1 . 0 , ĠShe ep Entity :: class . java )) Ċĉ ĉ goal Selector . add ( 3 , ĠTemp t Goal ( this , Ġ 1 . 1 , ĠTEMP T ATION _ ITEMS , Ġfalse )) Ċĉ ĉ goal Selector . add ( 4 , ĠFollow Parent Goal ( this , Ġ 1 . 1 )) Ċĉ ĉ goal Selector . add ( 5 , Ġthis . eat Gr ass Goal ) Ċĉ ĉ goal Selector . add ( 6 , ĠLook At Entity Goal ( this , ĠPlayer Entity :: class . java , Ġ 6 . 0 f )) Ċĉ ĉ goal Selector . add ( 7 , ĠLook Around Goal ( this )) Ċ ĉ } ĊĊ ĉ override Ġfun Ġget Ambient Sound (): ĠSound Event ? Ġ= ĠSound Events . ENTITY _ SHE EP _ AM BI ENT Ċ ĉ override Ġfun Ġget Death Sound (): ĠSound Event ? Ġ= ĠSound Events . ENTITY _ SHE EP _ DE ATH Ċ ĉ override Ġfun Ġget H urt Sound ( source : ĠDamage Source ?): ĠSound Event ? Ġ= ĠSound Events . ENTITY _ SHE EP _ H UR T Ċ ĉ override Ġfun Ġplay Step Sound ( pos : ĠBlockPos ?, Ġstate : ĠBlock State ?) Ġ{ Ċĉ ĉ play Sound ( Sound Events . ENTITY _ SHE EP _ STEP , Ġ 0 . 1 f , Ġ 1 f ) Ċ ĉ } ĊĊ ĉ override Ġfun Ġmob Tick () Ġ{ Ċĉ ĉ this . ruby She ep Timer Ġ= Ġeat Gr ass Goal . timer Ċĉ ĉ super . mob Tick () Ċ ĉ } ĊĊ ĉ override Ġfun Ġtick Movement () Ġ{ Ċĉ ĉ if Ġ( world . is Client ) Ġ{ Ċĉĉ ĉ ruby She ep Timer Ġ= Ġ 0 . coerce At Least ( ruby She ep Timer Ġ- Ġ 1 ) Ċĉ ĉ } ĊĊĉ ĉ super . tick Movement () Ċ ĉ } ĊĊ ĉ override Ġfun Ġhandle Status ( id : ĠByte ) Ġ= Ċĉ ĉ if Ġ( id . toInt () Ġ== Ġ 1 0 ) Ġ{ Ċĉĉ ĉ ruby She ep Timer Ġ= Ġ 4 0 Ċĉ ĉ } Ġelse Ġ{ Ċĉĉ ĉ super . handle Status ( id ) Ċĉ ĉ } ĊĊ ĉ override Ġfun Ġshe ared ( category : ĠSound Category ) Ġ{ Ċĉ ĉ world . play Sound From Entity ( null Ġas ĠPlayer Entity ?, Ċĉĉ ĉ this , Ċĉĉ ĉ Sound Events . ENTITY _ SHE EP _ SHE AR , Ċĉĉ ĉ category , Ċĉĉĉ 1 . 0 f , Ċĉĉĉ 1 . 0 f ) Ċĉ ĉ this . is She ared Ġ= Ġtrue Ċĉ ĉ val Ġi Ġ= Ġ 1 Ġ+ Ġrandom . nextInt ( 3 ) ĊĊĉ ĉ for Ġ( j Ġin Ġ 0 Ġuntil Ġi ) Ġ{ Ċĉĉ ĉ val Ġitem Entity Ġ= Ġthis . drop Item ( Block Registry . ruby W ool , Ġ 1 ) Ċĉĉ ĉ if Ġ( item Entity Ġ!= Ġnull ) Ġ{ Ċĉĉĉ ĉ item Entity . velocity Ġ= Ċĉĉĉĉ ĉ item Entity . velocity . add ((( random . next Float () Ġ- Ġrandom . next Float ()) Ġ* Ġ 0 . 1 f ). toDouble (), Ċĉĉĉĉĉ ĉ ( random . next Float () Ġ* Ġ 0 . 0 5 f ). toDouble (), Ċĉĉĉĉĉ ĉ (( random . next Float () Ġ- Ġrandom . next Float ()) Ġ* Ġ 0 . 1 f ). toDouble ()) Ċĉĉ ĉ } Ċĉ ĉ } Ċ ĉ } ĊĊ ĉ override Ġfun Ġinitialize ( Ċĉ ĉ world : ĠServer World Access ?, Ċĉ ĉ difficulty : ĠLocal Difficulty ?, Ċĉ ĉ spawn Reason : ĠSpawn Reason ?, Ċĉ ĉ entity Data : ĠEntity Data ?, Ċĉ ĉ entity Tag : ĠCompound Tag ?, Ċ ĉ ): ĠEntity Data ? Ġ{ Ċĉ ĉ val Ġinitial Spawn Result Ġ= Ġsuper . initialize ( world , Ġdifficulty , Ġspawn Reason , Ġentity Data , Ġentity Tag ) Ċĉ ĉ this . color Ġ= ĠD ye Color . WHITE Ċĉ ĉ return Ġinitial Spawn Result Ċ ĉ } ĊĊ ĉ override Ġfun Ġcan B reed With ( other : ĠAnimal Entity ?): ĠBoolean Ġ{ Ċĉ ĉ return Ġother Ġis ĠShe ep Entity Ġ&& Ġother . isIn Lo ve () Ċ ĉ } ĊĊ ĉ override Ġfun Ġget Lo ot Table Id (): ĠIdentifier Ġ= Ġid (" entities / ruby _ she ep ") ĊĊ ĉ comp anion Ġobject Ġ{ Ċĉ ĉ val ĠTEMP T ATION _ ITEMS : ĠIng redient Ġ= ĠIng redient . of Items ( Item Registry . ruby , ĠItems . W HE AT ) ĊĊĉ ĉ @ Jvm Static Ċĉ ĉ fun Ġset Custom Attributes (): ĠDefault Attribute Container . Builder Ġ{ Ċĉĉ ĉ // Ġfunc _ 2 3 3 6 6 6 _ p _() Ġ-> Ġregister Attributes () Ċĉĉ ĉ return ĠMob Entity . create Mob Attributes () Ċĉĉĉ ĉ . add ( Entity Attributes . GENERIC _ MAX _ HE ALTH , Ġ 1 0 . 0 ) Ċĉĉĉ ĉ . add ( Entity Attributes . GENERIC _ MOVE MENT _ SPEED , Ġ 0 . 2 3 ) Ċĉ ĉ } Ċ ĉ } Ċ }