Created
March 17, 2019 14:29
-
-
Save hhachiya/ed1f43efd44df5a7b4ffb5b504f3ddc9 to your computer and use it in GitHub Desktop.
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 mcpi.minecraft import Minecraft | |
from mcpi.block import * | |
import numpy as np | |
mc = Minecraft.create() | |
pos = mc.player.getTilePos() | |
r = 20 | |
numBlocks = 150 | |
for theta in np.arange(0,2*np.pi,2*np.pi/ numBlocks): | |
for phi in np.arange(0,2*np.pi,2*np.pi/ numBlocks): | |
mc.setBlock(pos.x + r * np.cos(phi) * np.cos(theta),pos.y + r * np.sin(phi),pos.z + r * np.cos(phi) * np.sin(theta),1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment