[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]
Hi I am playing around with python and the minecraft pi api the following code should produce a line of stone blocks import minecraft import block #Initialise mc = minecraft.Minecraft.create() #Produce a line of blocks for x in xrange(0, 10): mc.setBlock(x, 15, 0, block.STONE) I can change STONE to something else in the code. I am trying to create a modification so a user can specify a block to produce by the script import minecraft import block #Initialise mc = minecraft.Minecraft.create() #list of blocks can be found here http://www.piprogramming.org #/wiki/index.php?title=Minecraft_Block_Types_List #Ask what block is required blockname = raw_input("block type ? ") #Produce a line of blocks for x in xrange(0, 10): mc.setBlock(x, 15, 0, block.blockname) so take input and store as block name the pass this on to stone.blockname so it comes up with the required set of blocks, this doesn't seem to be working properly though any ideas as to where I am going wrong, it should be simple enough to pass user input to something. I am probably just missing something simple thanks Paul -- -- http://www.zleap.net http://www.linkedin.com/pub/paul-sutton/36/595/911 I am committed to safeguarding children, young people and vulnerable groups and expect any school or establishment I am involved with to share this commitment. -- The Mailing List for the Devon & Cornwall LUG http://mailman.dclug.org.uk/listinfo/list FAQ: http://www.dcglug.org.uk/listfaq