package Ġju ux el . ad orn . block Ċ Ċ import Ġnet . minecraft . block . Block Ċ import Ġnet . minecraft . block . BlockState Ċ import Ġnet . minecraft . block . Pane Block Ċ import Ġnet . minecraft . entity . ai . path ing . Navigation Type Ċ import Ġnet . minecraft . item . Item Placement Context Ċ import Ġnet . minecraft . state . StateManager Ċ import Ġnet . minecraft . state . property . Boolean Property Ċ import Ġnet . minecraft . state . property . Properties Ċ import Ġnet . minecraft . tag . Block Tags Ċ import Ġnet . minecraft . util . math . Block Pos Ċ import Ġnet . minecraft . util . math . Direction Ċ import Ġnet . minecraft . world . Block View Ċ import Ġnet . minecraft . world . World Access Ċ Ċ class ĠChain Link Fence Block ( settings : ĠSettings ) Ġ: ĠP ane Block ( settings ) Ġ{ ĊĠĠĠ Ġinit Ġ{ ĊĠĠĠĠĠĠĠ Ġdefault State Ġ= Ġdefault State . with ( UP , Ġfalse ). with ( DOWN , Ġfalse ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġappend Properties ( builder : ĠState Manager . Builder < Block , ĠBlock State >) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . append Properties ( builder ) ĊĠĠĠĠĠĠĠ Ġbuilder . add ( UP , ĠDOWN ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġget Placement State ( ctx : ĠItem Placement Context ): ĠBlock State ? Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġstate Ġ= Ġsuper . get Placement State ( ctx ) Ġ?: Ġreturn Ġnull ĊĠĠĠĠĠĠĠ Ġval Ġworld Ġ= Ġctx . world ĊĠĠĠĠĠĠĠ Ġval Ġpos Ġ= Ġctx . block Pos ĊĊĠĠĠĠĠĠĠ Ġreturn Ġstate ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. with ( UP , Ġconnects Vert ically To ( world . getBlock State ( pos . up ()))) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. with ( DOWN , Ġconnects Vert ically To ( world . getBlock State ( pos . down ()))) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠgetState For Neighbor Update ( ĊĠĠĠĠĠĠĠ Ġstate : ĠBlock State , Ġfacing : ĠDirection , Ġneighbor State : ĠBlock State , Ġworld : ĠWorld Access , Ġpos : ĠBlockPos , Ġneighbor Pos : ĠBlockPos ĊĠĠĠ Ġ): ĠBlock State Ġ{ ĊĠĠĠĠĠĠĠ Ġvar Ġresult Ġ= Ġsuper . getState For Neighbor Update ( state , Ġfacing , Ġneighbor State , Ġworld , Ġpos , Ġneighbor Pos ) ĊĊĠĠĠĠĠĠĠ Ġif Ġ( facing Ġ== ĠDirection . UP ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġresult Ġ= Ġresult . with ( UP , Ġconnects Vert ically To ( neighbor State )) ĊĠĠĠĠĠĠĠ Ġ} Ġelse Ġif Ġ( facing Ġ== ĠDirection . DOWN ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġresult Ġ= Ġresult . with ( DOWN , Ġconnects Vert ically To ( neighbor State )) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġreturn Ġresult ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġis Side In visible ( state : ĠBlock State , Ġneighbor : ĠBlock State , Ġfacing : ĠDirection ) Ġ= Ġfalse ĊĊĠĠĠ Ġprivate Ġfun Ġconnects Vert ically To ( state : ĠBlock State ) Ġ= ĊĠĠĠĠĠĠĠ Ġstate . block Ġis ĠChain Link Fence Block ĊĊĠĠĠ Ġoverride Ġfun Ġcan Path find Through ( state : ĠBlock State , Ġworld : ĠBlock View , Ġpos : ĠBlockPos , Ġtype : ĠNavigation Type ) Ġ= Ġfalse ĊĊĠĠĠ Ġoverride Ġfun Ġconnect sTo ( state : ĠBlock State , Ġside Solid Full Square : ĠBoolean ): ĠBoolean Ġ= ĊĠĠĠĠĠĠĠ Ġsuper . connect sTo ( state , Ġside Solid Full Square ) Ġ|| Ġstate . isIn ( Block Tags . F ENCE _ G ATES ) ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġval ĠUP : ĠBoolean Property Ġ= ĠProperties . UP ĊĠĠĠĠĠĠĠ Ġval ĠDOWN : ĠBoolean Property Ġ= ĠProperties . DOWN ĊĠĠĠ Ġ} Ċ } Ċ