Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

Commit

Permalink
Yet another fix: Thanks Python guys.
Browse files Browse the repository at this point in the history
  • Loading branch information
torralbaa committed Nov 14, 2020
1 parent 8db953a commit d3af6d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ pack:
sudo chmod a+x ./deb/usr/bin/mcpil
sudo chmod a+x ./deb/usr/bin/mcpim
@echo "Package: mcpil" > ./deb/DEBIAN/control
@echo "Version: 0.7.2" >> ./deb/DEBIAN/control
@echo "Version: 0.7.3" >> ./deb/DEBIAN/control
@echo "Priority: optional" >> ./deb/DEBIAN/control
@echo "Architecture: armhf" >> ./deb/DEBIAN/control
@echo "Depends: libmcpi, mcpi-proxy, mcpi-central, libmodpi, libmcpi-docker, python3, libfreeimage3, libglfw3, minecraft-pi, python3-tk" >> ./deb/DEBIAN/control
@echo "Depends: libmcpi, mcpi-proxy, mcpi-central, libmodpi, libmcpi-docker, python3, libfreeimage3, libglfw3, minecraft-pi, python3-tk, libgles2-mesa" >> ./deb/DEBIAN/control
@echo "Maintainer: Alvarito050506 <[email protected]>" >> ./deb/DEBIAN/control
@echo "Homepage: https://mcpi.tk" >> ./deb/DEBIAN/control
@echo "Vcs-Browser: https://github.com/MCPI-Devs/MCPIL" >> ./deb/DEBIAN/control
@echo "Vcs-Git: https://github.com/MCPI-Devs/MCPIL.git" >> ./deb/DEBIAN/control
@echo "Description: Simple launcher for Minecraft: Pi Edition.\n" >> ./deb/DEBIAN/control
dpkg-deb -b ./deb/ ./mcpil_0.7.2-1.deb
dpkg-deb -b ./deb/ ./mcpil_0.7.3-1.deb

clean:
rm -rf ./deb/
Expand Down
5 changes: 4 additions & 1 deletion src/mcpil.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,10 @@ def save_world():
old_world_name = old_worldname_entry.get();
new_world_name = new_worldname_entry.get();
world_file = open(f"{home}/.minecraft/games/com.mojang/minecraftWorlds/{old_world_name}/level.dat", "rb+");
new_world = world_file.read().replace(bytes([len(old_world_name), 0x00]).join(bytes(old_world_name.encode())), bytes([len(old_world_name), 0x00]).join(bytes(old_world_name.encode())));
new_world = world_file.read();
old_bytes = bytes([len(old_world_name), 0x00]).join([old_world_name.encode()]);
new_bytes = bytes([len(old_world_name), 0x00]).join([old_world_name.encode()]);
new_world = new_world.replace(old_bytes, new_bytes);
world_file.seek(0);
world_file.write(new_world);
world_file.seek(0x16);
Expand Down

0 comments on commit d3af6d8

Please sign in to comment.