This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mcpi.minecraft as minecraft | |
import mcpi.entity as entity | |
mc = minecraft.Minecraft() | |
pos = mc.player.getPos() | |
for y in range(10): | |
for x in range(10): | |
mc.spawnEntity(entity.CHICKEN, pos.x + x + 1, pos.y + y, pos.z + 1, "{Passive:1}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from time import sleep | |
import mcpi.minecraft as minecraft | |
import mcpi.block as block | |
# 拡大率 | |
scale = 4 | |
# 数値のチップ | |
# 0 - 9までを数値化しておく | |
# ブロックを配置するところは1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import mcpi.minecraft as minecraft | |
import mcpi.block as block | |
# 奇数を設定する事 | |
# 迷路の一片の長さ | |
line = 51 | |
# 壁として設置するブロック | |
blockType = block.DIAMOND_BLOCK | |
# 壁の高さ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mcpi.minecraft as minecraft | |
import mcpi.block as block | |
mc = minecraft.Minecraft() | |
pos = mc.player.getPos() | |
size = 10 | |
for y in range(size): | |
for x in range(size): | |
for z in range(size): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mcpi.minecraft as minecraft | |
import mcpi.block as block | |
mc = minecraft.Minecraft() | |
playerPos = mc.player.getPos() | |
for counter in range(100): | |
if counter % 2 == 0: | |
mc.setBlock(playerPos.x+counter, playerPos.y-1,playerPos.z, block.DIAMOND_BLOCK) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# UTF-8で保存して実行して下さい. | |
# 真と偽についての確認用プログラム | |
# 数値型 | |
if 0: | |
print(0) | |
if 1: | |
print(1) | |
if 10: | |
print(10) | |
if 0.0: |