package Ġcom . w illiam bl . ha ema . util Ċ Ċ import Ġio . netty . buffer . Un p ooled Ċ import Ġnet . fabric mc . fabric . api . event . lifecycle . v 1 . Server Entity Events Ċ import Ġnet . fabric mc . fabric . api . gam er ule . v 1 . Custom Game Rule Category Ċ import Ġnet . fabric mc . fabric . api . gam er ule . v 1 . Game Rule Factory Ċ import Ġnet . fabric mc . fabric . api . gam er ule . v 1 . Game Rule Registry Ċ import Ġnet . fabric mc . fabric . api . gam er ule . v 1 . rule . Double Rule Ċ import Ġnet . fabric mc . fabric . api . networking . v 1 . Server Play Networking Ċ import Ġnet . minecraft . entity . player . Player Entity Ċ import Ġnet . minecraft . network . Packet Byte Buf Ċ import Ġnet . minecraft . server . network . Server Player Entity Ċ import Ġnet . minecraft . text . Trans latable Text Ċ import Ġnet . minecraft . util . Formatting Ċ import Ġnet . minecraft . util . Identifier Ċ import Ġnet . minecraft . world . Game Rules Ċ Ċ late init Ġvar Ġv amp ires Burn : ĠGame Rules . Key < Game Rules . Boolean Rule > Ċ Ċ late init Ġvar Ġv amp ires D rown : ĠGame Rules . Key < Game Rules . Boolean Rule > Ċ Ċ late init Ġvar Ġfeed Cooldown : ĠGame Rules . Key < Game Rules . Int Rule > Ċ Ċ late init Ġvar Ġdash Cooldown : ĠGame Rules . Key < Game Rules . Int Rule > Ċ Ċ late init Ġvar Ġv amp ire H unter Notice Chance : ĠGame Rules . Key < Double Rule > Ċ Ċ late init Ġvar Ġplayer V amp ire Conversion : ĠGame Rules . Key < Game Rules . Boolean Rule > Ċ Ċ val Ġha ema Category Ġ= ĠCustom Game Rule Category ( Identifier (" ha ema : ha ema "), ĠTrans latable Text (" gam er ule . category . ha ema "). formatted ( ĊĠĠĠ ĠFormat ting . BOLD ). formatted ( Formatting . YELLOW )) Ċ Ċ fun Ġregister Game Rules () Ġ{ ĊĠĠĠ Ġv amp ires Burn Ġ= ĠGame Rule Registry . register (" v amp ires Burn ", ĠGame Rules . Category . PLAYER , ĠGame Rule Factory . create Boolean Rule ( true )) ĊĠĠĠ Ġv amp ires D rown Ġ= ĠGame Rule Registry . register (" v amp ires D rown ", ĠGame Rules . Category . PLAYER , ĠGame Rule Factory . create Boolean Rule ( true )) ĊĠĠĠ Ġfeed Cooldown Ġ= ĠGame Rule Registry . register (" feed Cooldown ", ĠGame Rules . Category . PLAYER , ĠGame Rule Factory . create Int Rule ( 1 0 , Ġ 0 , Ġ 2 4 0 0 0 )) ĊĊĠĠĠ Ġdash Cooldown Ġ= ĠGame Rule Registry . register (" dash Cooldown ", ĠGame Rules . Category . PLAYER , ĠGame Rule Factory . create Int Rule ( 1 0 , Ġ 0 , Ġ 2 4 0 0 0 ) Ġ{ Ġserver , Ġrule Ġ-> ĊĠĠĠĠĠĠĠ Ġval Ġbuf Ġ= ĠPacket Byte Buf ( Un p ooled . buffer ()) ĊĠĠĠĠĠĠĠ Ġbuf . writeInt ( rule . get ()) ĊĠĠĠĠĠĠĠ Ġserver . player Manager . send To All ( Server Play Networking . create S 2 CP acket ( Identifier (" ha ema : updated ash co old own "), Ġbuf )) ĊĠĠĠ Ġ}) ĊĠĠĠ ĠServer Entity Events . ENTITY _ LOAD . register ( Server Entity Events . Load Ġ{ Ġentity , Ġserver World Ġ-> ĊĠĠĠĠĠĠĠ Ġif Ġ( entity Ġis ĠPlayer Entity ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġbuf Ġ= ĠPacket Byte Buf ( Un p ooled . buffer ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbuf . writeInt ( server World . game Rules . get ( dash Cooldown ). get ()) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠServer Play Networking . send ( entity Ġas ĠServer Player Entity , ĠIdentifier (" ha ema : updated ash co old own "), Ġbuf ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ}) ĊĊĠĠĠ Ġv amp ire H unter Notice Chance Ġ= ĠGame Rule Registry . register (" v amp ire H unter Notice Chance ", ĠGame Rules . Category . MO BS , ĠGame Rule Factory . create Double Rule ( 0 . 1 , Ġ 0 . 0 , Ġ 1 . 0 )) ĊĠĠĠ Ġplayer V amp ire Conversion Ġ= ĠGame Rule Registry . register (" player V amp ire Conversion ", ĠGame Rules . Category . PLAYER , ĠGame Rule Factory . create Boolean Rule ( true )) Ċ }