Skip to content

Commit

Permalink
1.1.4 Release
Browse files Browse the repository at this point in the history
Yay, added partner servers
  • Loading branch information
xroix committed Aug 12, 2020
1 parent 72a9012 commit 57de529
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 4 deletions.
33 changes: 31 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,31 @@
# FOV CHANGER
by XroixHD
# FOV CHANGER ![GitHub All Releases](https://img.shields.io/github/downloads/XroixHD/MCBE-Win10-FOV-Changer/total)
Ever wanted to have a better view in Mcbe?

![Zoom Example](./res/example.gif)

Or show your connected server in discord?

![Discord Example](./res/discord.png)

Compatible Versions
---
- Minecraft: Bedrock Edition (**Win10** only)

Features
---
- **Zoom** via Hotkey
- FOV
- Hide Hand
- Sensitivity

- **Discord** Rich Presence
- Connected server
- Port (If not 192)

Download
---
[Download directly](https://www.github.com/XroixHD/MCBE-Win10-FOV-Changer/releases/latest/download/FOV-Changer.zip )

Docs
---
[Link](https://fov.xroix.me/docs )
Binary file added res/discord.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/example.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion run.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from src import core


VERSION = "1.1.3"
VERSION = "1.1.4"
DEBUG = False


Expand Down
21 changes: 21 additions & 0 deletions src/network/discord.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ def __init__(self, references: dict, loop):
self.last_server = None
self.last_time = None

self.partner_servers = {
"hivebedrock.network": "The Hive",
"inpvp.net": "Mineville",
"mineplex.com": "Mineplex",
"galaxite.net": "Galaxite",
"lbsg.net": "Lifeboat",
"cubecraft.net": "CubeCraft"
}

self.feature = None

# For ui
Expand All @@ -27,6 +36,14 @@ def __init__(self, references: dict, loop):
# Add to references
self.references.update({"Discord": self})

@staticmethod
def get_server_part(server) -> str:
""" Get the needed part from server ip / domain for the partner_servers hash table
:param server: server domain
:returns: needed part from server domain
"""
return ".".join(server.split(".")[-1:-3:-1][::-1])

def update(self, connected: bool, server: str, version: str):
""" Updates the rich presence
:param connected: if fov changer started and connected
Expand All @@ -49,6 +66,10 @@ def update(self, connected: bool, server: str, version: str):

# Connected to server
elif server:
# Check if server is partnered
if (part := self.get_server_part(server)) in self.partner_servers:
server = self.partner_servers[part]

details = f"Playing {server}"

# Main menu or private world todo
Expand Down
2 changes: 1 addition & 1 deletion src/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def queue_update(self):

else:
# Attribute of thread
if isinstance("cmd", str):
if isinstance(task["cmd"], str): # Please save this fix, i dont want to release another time .-.
t = getattr(self, task["cmd"])(*task["params"], **task["kwargs"])

# Callable method
Expand Down

0 comments on commit 57de529

Please sign in to comment.