@@ -14,7 +14,7 @@ class Game {
1414 }
1515 this . fov = {
1616 normal : 70 ,
17- sprint : 85 ,
17+ sprint : 80 ,
1818 } ;
1919 this . toxelSize = 27 ;
2020 this . dimension = null ;
@@ -28,6 +28,7 @@ class Game {
2828 "minecraft:nether" : [ 133 / 255 , 40 / 255 , 15 / 255 ] ,
2929 } ;
3030 this . headHeight = 17 ;
31+ this . gamemode = null ;
3132
3233 Setup ( this , ( ) => {
3334 this . init ( ) ;
@@ -38,7 +39,7 @@ class Game {
3839 init ( ) {
3940 this . socket . on ( "connect" , ( ) => {
4041 console . log ( "Connected to server!" ) ;
41- $ ( ".loadingText" ) . text ( "Joining server..." ) ;
42+ $ ( ".loadingText" ) . text ( `Connecting to ${ this . server } ` ) ;
4243 console . log ( `User nick: ${ this . nick } ` ) ;
4344 console . log ( `Server ip: ${ this . server } :${ this . serverPort } ` ) ;
4445 this . socket . emit ( "initClient" , {
@@ -72,7 +73,7 @@ class Game {
7273 this . world . computeSections ( sections , x , z ) ;
7374 } ) ;
7475 this . socket . on ( "game" , ( gameData ) => {
75- this . inv_bar . setGamemode ( gameData . gameMode ) ;
76+ this . inv_bar . updateGamemode ( gameData . gameMode ) ;
7677 } ) ;
7778 this . socket . on ( "hp" , ( points ) => {
7879 this . inv_bar . setHp ( points ) ;
@@ -182,7 +183,7 @@ class Game {
182183 if ( this . eh . gameState === "inventory" ) {
183184 this . pii . render ( ) ;
184185 }
185- this . inv_bar . update ( ) ;
186+ this . inv_bar . updateItems ( ) ;
186187 this . distanceBasedFog . update ( ) ;
187188 this . renderer . render ( this . scene , this . camera ) ;
188189 }
0 commit comments