forked from happyleibniz/Minecraft_python_Edition
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.py
More file actions
41 lines (33 loc) · 946 Bytes
/
settings.py
File metadata and controls
41 lines (33 loc) · 946 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import random
# import timeit
import pygame
from pyglet import font
import json
lang_type_file = open("gui/lang.mclanguage", "r")
lang_type = str(lang_type_file.read())
current_language = lang_type
print(current_language)
def load_language():
with open(f"assets/Minecraft/languages/{current_language}.json", "r", encoding="utf-8") as file:
return json.load(file)
translations = load_language()
if current_language == "zh":
font.add_file('gui/MinecraftAE.ttf')
mainFont = font.load('gui/MinecraftAE.ttf', 15)
elif current_language == "en":
font.add_file('gui/main.ttf')
mainFont = font.load('gui/main.ttf', 20)
pygame.init()
monitor = pygame.display.Info()
WIDTH = 927 # monitor.current_w
HEIGHT = 566 # monitor.current_h
MAX_FPS = 120
PAUSE = True
IN_MENU = True
MC_VERSION = "1.0"
clock = pygame.time.Clock()
DEBUG = True
FOV = 100
RENDER_DISTANCE = 999
CHUNKS_RENDER_DISTANCE = 900
CHUNK_SIZE = (4, 60, 4)