Initial commit

This commit is contained in:
BarsTigerMeowcat
2020-01-26 12:49:01 +02:00
commit 8bed7171c2
125 changed files with 3212 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
from mcpi.minecraft import Minecraft
mc = Minecraft.create()
import shelve
def buildStructure(x, y, z, structure):
xStart = x
zStart = z
for row in structure:
for column in reversed(row):
for block in column:
mc.setBlock(x, y, z, block)
z += 1
x += 1
z = zStart
y += 1
x = xStart
name = input("Введите название конструкции, которую хотите построить ")
superBuildsFile = shelve.open("superBuildsFile.db")
pos = mc.player.getTilePos()
x = pos.x
y = pos.y
z = pos.z
buildStructure(x, y, z, superBuildsFile[name])

View File

@@ -0,0 +1,26 @@
from mcpi.minecraft import Minecraft
mc = Minecraft.create()
import pickle
def buildStructure(x, y, z, structure):
xStart = x
zStart = z
for row in structure:
for column in reversed(row):
for block in column:
mc.setBlock(x, y, z, block)
z += 1
x += 1
z = zStart
y += 1
x = xStart
name = input("Введите название файла, который хотите открыть ") + ".txt"
file = open(name, "rb")
structure = pickle.load(file)
pos = mc.player.getTilePos()
x = pos.x
y = pos.y
z = pos.z
buildStructure(x, y, z, structure)

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,14 @@
toDoFile = open("toDoFile.txt", "w", encoding="utf-8")
mnogoZapominaushihKotikov = ""
odinKotik = input("Введите описание дела(vot tak), котики его запомнят: ")
while odinKotik != "zxc":
mnogoZapominaushihKotikov = mnogoZapominaushihKotikov + odinKotik + "\n"
odinKotik = input("Введите описание дела(vot tak)(или zxc для выхода)(после поставьте пробел и нажмите ENTER), котики его запомнят: ")
toDoFile.write(mnogoZapominaushihKotikov)
toDoFile.close(),

View File

@@ -0,0 +1,6 @@
from flask import Flask
app = Flask(__name__)
@app.route("/")
def showName():
return "Андрей Мешко"
app.run()

View File

@@ -0,0 +1,8 @@
from mcpi.minecraft import Minecraft
mc = Minecraft.create()
zapominausieKotiki = open("toDoFile.txt", "r")
for zapominausiyKotik in zapominausieKotiki:
mc.postToChat(zapominausiyKotik)
print(zapominausiyKotik)

View File

@@ -0,0 +1,12 @@
from flask import Flask
app = Flask(__name__)
from mcpi.minecraft import Minecraft
mc = Minecraft.create()
pos = mc.player.getTilePos()
x, y, z = str(pos.x), str(pos.y), str(pos.z)
@app.route("/")
def showPosition():
return "Ваши координаты на момент запуска программы: " + "х-" + x + ", y-" + y + ", z-" + z
app.run()

View File

@@ -0,0 +1,50 @@
from mcpi.minecraft import Minecraft
mc = Minecraft.create()
import shelve
def sortPair(val1, val2):
if val1 > val2:
return val2, val1
else:
return val1, val2
def copyStructure(x1, y1, z1, x2, y2, z2):
x1, x2 = sortPair(x1, x2)
y1, y2 = sortPair(y1, y2)
z1, z2 = sortPair(z1, z2)
width = x2 - x1
height = y2 - y1
length = z2 - z1
structure = []
print("Подождите, пока мы смотрим видео про котиков и заставляем себя начать копировать блоки воздуха, которые вы случайно добавили в пространство копирования, в список")
print("ЧТО? Так быстро закончилось видео? Ну ладно, начинаем. А вы пока покормите своих оцелотов")
for row in range(height):
structure.append([])
for column in range(width):
structure[row].append([])
for depth in range(length):
block = mc.getBlock(x1 + column, y1 + row, z1 + depth)
structure[row][column].append(block)
return structure
input("Подойдите к одному углу констукции и нажмите ")
pos = mc.player.getTilePos()
x1, y1, z1 = pos.x, pos.y, pos.z
input("Подойдите к противоположному углу и нажмите ")
pos = mc.player.getTilePos()
x2, y2, z2 = pos.x, pos.y, pos.z
structure = copyStructure(x1, y1, z1, x2, y2, z2)
structureName = input("Как назовем конструкцию? ")
superBuildsFile = shelve.open("superBuildsFile.db")
superBuildsFile[structureName] = structure
superBuildsFile.close()

View File

@@ -0,0 +1,51 @@
from mcpi.minecraft import Minecraft
mc = Minecraft.create()
import pickle
def sortPair(val1, val2):
if val1 > val2:
return val2, val1
else:
return val1, val2
def copyStructure(x1, y1, z1, x2, y2, z2):
x1, x2 = sortPair(x1, x2)
y1, y2 = sortPair(y1, y2)
z1, z2 = sortPair(z1, z2)
width = x2 - x1
height = y2 - y1
length = z2 - z1
structure = []
print("Подождите, пока мы смотрим видео про котиков и заставляем себя начать копировать блоки воздуха, которые вы случайно добавили в пространство копирования, в список")
print("ЧТО? Так быстро закончилось видео? Ну ладно, начинаем. А вы пока покормите своих оцелотов")
for row in range(height):
structure.append([])
for column in range(width):
structure[row].append([])
for depth in range(length):
block = mc.getBlock(x1 + column, y1 + row, z1 + depth)
structure[row][column].append(block)
return structure
input("Подойдите к одному углу констукции и нажмите ")
pos = mc.player.getTilePos()
x1, y1, z1 = pos.x, pos.y, pos.z
input("Подойдите к противоположному углу и нажмите ")
pos = mc.player.getTilePos()
x2, y2, z2 = pos.x, pos.y, pos.z
structure = copyStructure(x1, y1, z1, x2, y2, z2)
nameOfFile = input("Как назовем файл? ") + ".txt"
nameOfFile = open(nameOfFile, "xb")
pickle.dump(structure, nameOfFile)
# pickleFile = open("pickleFile.txt", "wb")
# pickle.dump(structure, pickleFile)

View File

@@ -0,0 +1,2 @@
koti
koti

Binary file not shown.