Skip to content

Commit

Permalink
Release 0.2 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaTKC committed Sep 12, 2021
1 parent c9c5789 commit e8b5c7c
Show file tree
Hide file tree
Showing 50 changed files with 1,047 additions and 5 deletions.
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
# MCPI Hacks
by Nitro
# MCPI Hacks / MCPI Enhancer
by MegaTKC

## Requirements
- Minecraft-PI / Minecraft-Pi-Reborn
- Python 3.6
- Python 2.7

## Usage
Download this repo from git clone or from zip. If downloaded repo from zip you must extract it. Now open the repo and run python filename.py. These hacks are in real clients such as WURST and Sigma.
Download this repo from git clone or from zip. If downloaded repo from zip you must extract it. Now open the repo and run python2 app.py. These hacks are in real clients such as WURST, Sigma and Zeroday.

### Known Issues and Bugs
Hacks such as scaffold are invisible to players, so users / mobs can walk through your client-side blocks. When in the sky with scaffold players will see you walking on invisible blocks or just floating in the air. You can run this in survival mode and creative mode in MCPI.
- Hacks such as scaffold are invisible to players, so users / mobs can walk through your client-side blocks. When in the sky with scaffold players will see you walking on invisible blocks or just floating in the air. You can run this in survival mode and creative mode in MCPI.
- To stop Scaffold or ChatSpammer, you need to go into the terminal and hit CTRL + C on your keyboard to remove the previously selected module.


## Changelog (0.2)
- Added NameTags
- Renamed to MCPI Enhancer
- Added AutoJump
- Added GUI for Ease of use

### Join my Minecraft-Pi Server!
- nitro.pocket-server.net:19132

53 changes: 53 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# MCPI Hacks GUI Panel / Requires Python 3

import Tkinter
import tkMessageBox
import os
import sys

root = Tkinter.Tk()

root.title("MCPI Enhancer")
root.geometry('350x200')

# Hacks / Modules Start
def chatSpammer():
print "chat-spammer.py running"
os.system('python2 chat-spammer.py')

B = Tkinter.Button(root, text ="ChatSpammer", command = chatSpammer)

B.pack()

def scaffoldWalk():
print "scaffold.py running"
os.system('python2 scaffold.py')

B = Tkinter.Button(root, text ="Scaffold", command = scaffoldWalk)

B.pack()

def nametags():
print "nametagsGui running"
os.system('python2 mcpisettings/NameTags/gui.py')

B = Tkinter.Button(root, text ="NameTags", command = nametags)

B.pack()

def autojump():
print "autojumpGui running"
os.system('python2 mcpisettings/AutoJump/gui.py')

B = Tkinter.Button(root, text ="AutoJump", command = autojump)

B.pack()

def quit():
print "Good Bye!"
root.destroy()

B = Tkinter.Button(root, text ="Quit", command = quit)

B.pack()
root.mainloop()
5 changes: 5 additions & 0 deletions mcpisettings/AutoJump/autojump-disable.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import minecraft.minecraft as minecraft

mc = minecraft.Minecraft.create()

mc.setting("autojump", False)
5 changes: 5 additions & 0 deletions mcpisettings/AutoJump/autojump-enable.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import minecraft.minecraft as minecraft

mc = minecraft.Minecraft.create()

mc.setting("autojump", True)
34 changes: 34 additions & 0 deletions mcpisettings/AutoJump/gui.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import Tkinter
import tkMessageBox
import os
import sys

root = Tkinter.Tk()

root.title("AutoJump")
root.geometry('350x200')

def enable():
print "Enabled"
os.system('python2 mcpisettings/AutoJump/autojump-enable.py')

B = Tkinter.Button(root, text ="Enable", command = enable)

B.pack()

def disable():
print "Disabled"
os.system('python2 mcpisettings/AutoJump/autojump-disable.py')

B = Tkinter.Button(root, text ="Disable", command = disable)

B.pack()

def quit():
print "Quit AutoJump Gui"
root.destroy()

B = Tkinter.Button(root, text ="Quit", command = quit)

B.pack()
root.mainloop()
Empty file.
Binary file added mcpisettings/AutoJump/minecraft/__init__.pyc
Binary file not shown.
89 changes: 89 additions & 0 deletions mcpisettings/AutoJump/minecraft/block.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
class Block:
"""Minecraft PI block description. Can be sent to Minecraft.setBlock/s"""
def __init__(self, id, data=0):
self.id = id
self.data = data

def __cmp__(self, rhs):
return hash(self) - hash(rhs)

def __hash__(self):
return (self.id << 8) + self.data

def withData(self, data):
return Block(self.id, data)

def __iter__(self):
"""Allows a Block to be sent whenever id [and data] is needed"""
return iter((self.id, self.data))

AIR = Block(0)
STONE = Block(1)
GRASS = Block(2)
DIRT = Block(3)
COBBLESTONE = Block(4)
WOOD_PLANKS = Block(5)
SAPLING = Block(6)
BEDROCK = Block(7)
WATER_FLOWING = Block(8)
WATER_STATIONARY = Block(9)
LAVA_FLOWING = Block(10)
LAVA_STATIONARY = Block(11)
SAND = Block(12)
GRAVEL = Block(13)
GOLD_ORE = Block(14)
IRON_ORE = Block(15)
COAL_ORE = Block(16)
WOOD = Block(17)
LEAVES = Block(18)
GLASS = Block(20)
LAPIS_LAZULI_ORE = Block(21)
LAPIS_LAZULI_BLOCK = Block(22)
SANDSTONE = Block(24)
BED = Block(26)
COBWEB = Block(30)
GRASS_TALL = Block(31)
WOOL = Block(35)
FLOWER_YELLOW = Block(37)
FLOWER_CYAN = Block(38)
MUSHROOM_BROWN = Block(39)
MUSHROOM_RED = Block(40)
GOLD_BLOCK = Block(41)
IRON_BLOCK = Block(42)
STONE_SLAB_DOUBLE = Block(43)
STONE_SLAB = Block(44)
BRICK_BLOCK = Block(45)
TNT = Block(46)
BOOKSHELF = Block(47)
MOSS_STONE = Block(48)
OBSIDIAN = Block(49)
TORCH = Block(50)
FIRE = Block(51)
STAIRS_WOOD = Block(53)
CHEST = Block(54)
DIAMOND_ORE = Block(56)
DIAMOND_BLOCK = Block(57)
CRAFTING_TABLE = Block(58)
FARMLAND = Block(60)
FURNACE_INACTIVE = Block(61)
FURNACE_ACTIVE = Block(62)
DOOR_WOOD = Block(64)
LADDER = Block(65)
STAIRS_COBBLESTONE = Block(67)
DOOR_IRON = Block(71)
REDSTONE_ORE = Block(73)
SNOW = Block(78)
ICE = Block(79)
SNOW_BLOCK = Block(80)
CACTUS = Block(81)
CLAY = Block(82)
SUGAR_CANE = Block(83)
FENCE = Block(85)
GLOWSTONE_BLOCK = Block(89)
BEDROCK_INVISIBLE = Block(95)
STONE_BRICK = Block(98)
GLASS_PANE = Block(102)
MELON = Block(103)
FENCE_GATE = Block(107)
GLOWING_OBSIDIAN = Block(246)
NETHER_REACTOR_CORE = Block(247)
Binary file added mcpisettings/AutoJump/minecraft/block.pyc
Binary file not shown.
50 changes: 50 additions & 0 deletions mcpisettings/AutoJump/minecraft/connection.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import socket
import select
import sys
from util import flatten_parameters

""" @author: Aron Nieminen, Mojang AB"""

class RequestError(Exception):
pass

class Connection:
"""Connection to a Minecraft Pi game"""
RequestFailed = "Fail"

def __init__(self, address, port):
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.socket.connect((address, port))
self.lastSent = ""

def drain(self):
"""Drains the socket of incoming data"""
while True:
readable, _, _ = select.select([self.socket], [], [], 0.0)
if not readable:
break
data = self.socket.recv(1500)
e = "Drained Data: <%s>\n"%data.strip()
e += "Last Message: <%s>\n"%self.lastSent.strip()
sys.stderr.write(e)

def send(self, f, *data):
"""Sends data. Note that a trailing newline '\n' is added here"""
s = "%s(%s)\n"%(f, flatten_parameters(data))
#print "f,data:",f,data
#print "s",s
self.drain()
self.lastSent = s
self.socket.sendall(s)

def receive(self):
"""Receives data. Note that the trailing newline '\n' is trimmed"""
s = self.socket.makefile("r").readline().rstrip("\n")
if s == Connection.RequestFailed:
raise RequestError("%s failed"%self.lastSent.strip())
return s

def sendReceive(self, *data):
"""Sends and receive data"""
self.send(*data)
return self.receive()
Binary file added mcpisettings/AutoJump/minecraft/connection.pyc
Binary file not shown.
23 changes: 23 additions & 0 deletions mcpisettings/AutoJump/minecraft/event.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from vec3 import Vec3

class BlockEvent:
"""An Event related to blocks (e.g. placed, removed, hit)"""
HIT = 0

def __init__(self, type, x, y, z, face, entityId):
self.type = type
self.pos = Vec3(x, y, z)
self.face = face
self.entityId = entityId

def __repr__(self):
sType = {
BlockEvent.HIT: "BlockEvent.HIT"
}.get(self.type, "???")

return "BlockEvent(%s, %d, %d, %d, %d, %d)"%(
sType,self.pos.x,self.pos.y,self.pos.z,self.face,self.entityId);

@staticmethod
def Hit(x, y, z, face, entityId):
return BlockEvent(BlockEvent.HIT, x, y, z, face, entityId)
Binary file added mcpisettings/AutoJump/minecraft/event.pyc
Binary file not shown.
Loading

0 comments on commit e8b5c7c

Please sign in to comment.