@SubscribeEvent public void onRender(RenderTickEvent event){
  if (event.phase == Phase.START) {
    resizeIfNeeded();
  }
}

@ SubscribeEvent public void onRender ( RenderTickEvent event ) { if ( event . phase == Phase . START ) { resizeIfNeeded ( ) ; } }
called before and after the rendering of the world .
