Exemple #1
0
func start() {
	render.LoadTextures()
	initBlocks()
	con.init()

	initClient()
	fakeGen()

	if skipLogin {
		setScreen(newServerList())
		console.ExecConf("autoexec.cfg")
	} else {
		setScreen(newLoginScreen())
	}
	render.Start()
}
Exemple #2
0
func reloadResources() {
	console.Text("Bringing everything to a stop")
	for freeBuilders < maxBuilders {
		select {
		case pos := <-completeBuilders:
			freeBuilders++
			if c := chunkMap[chunkPosition{pos.X, pos.Z}]; c != nil {
				if s := c.Sections[pos.Y]; s != nil {
					s.building = false
				}
			}
		}
	}
	locale.Clear()
	render.LoadSkinBuffer()
	modelCache = map[string]*model{}
	console.Text("Reloading textures")
	render.LoadTextures()
	console.Text("Reloading biomes")
	loadBiomes()
	ui.ForceDraw()
	console.Text("Reloading blocks")
	reinitBlocks()
	console.Text("Marking chunks for rebuild")
	for _, c := range chunkMap {
		for _, s := range c.Sections {
			if s != nil {
				s.dirty = true
			}
		}
	}
	console.Text("Rebuilding static models")
	render.RefreshModels()
	console.Text("Reloading inventory")
	Client.playerInventory.Update()
}