tag:blogger.com,1999:blog-9007601562606157016.post153183248511167205..comments2023-05-11T16:21:37.725+01:00Comments on <Stuff about="code" />: Raspberry Pi - Minecraft API - the basicsMartin O'Hanlonhttp://www.blogger.com/profile/03047799173301971515noreply@blogger.comBlogger68125tag:blogger.com,1999:blog-9007601562606157016.post-65124416484382444282016-04-24T21:43:48.282+01:002016-04-24T21:43:48.282+01:00Well, there isn't one. This API was never real...Well, there isn't one. This API was never really meant to be changed; I don't see much else that needs to be added. And again, it's a learning tool, and not something like the Minecraft modding API for PC. <br /><br />However, Martin is working on a Spigot plugin for those who have PC Minecraft ($27 USD), which uses the same API as MC:PI with a few additions.<br /><br />http://dev.bukkit.org/bukkit-plugins/raspberryjuice/Nicholas Harrishttps://www.blogger.com/profile/10647157439664975151noreply@blogger.comtag:blogger.com,1999:blog-9007601562606157016.post-13333870750347499642016-04-24T18:31:29.731+01:002016-04-24T18:31:29.731+01:00OK, so what's the new alternative?OK, so what's the new alternative?Anonymoushttps://www.blogger.com/profile/00374289623668511571noreply@blogger.comtag:blogger.com,1999:blog-9007601562606157016.post-67702625992558050872016-04-20T21:41:19.432+01:002016-04-20T21:41:19.432+01:00Yeah, Mojang released it and hasn't updated it...Yeah, Mojang released it and hasn't updated it in years. Nor are there plans to update it in the future; it's meant as a learning tool anyway, to get you started with general programming.Nicholas Harrishttps://www.blogger.com/profile/10647157439664975151noreply@blogger.comtag:blogger.com,1999:blog-9007601562606157016.post-74259453515055634762016-04-20T21:40:04.605+01:002016-04-20T21:40:04.605+01:00Has this API now been abandoned ?
Has this API now been abandoned ?<br />Anonymoushttps://www.blogger.com/profile/16739833630977421217noreply@blogger.comtag:blogger.com,1999:blog-9007601562606157016.post-27667985833374247132016-04-19T20:31:56.814+01:002016-04-19T20:31:56.814+01:00I'm running on an up to data Pi, running "...I'm running on an up to data Pi, running "cat /opt/minecraft-pi/VERSION.txt shows "0.1.1 alpha". Is this the right version ?<br />It's just that none of the new player getDirection(*), getPitch(), or getRotation() work - as if I'm running an older API version.Anonymoushttps://www.blogger.com/profile/16739833630977421217noreply@blogger.comtag:blogger.com,1999:blog-9007601562606157016.post-63948337211431679452014-09-07T20:59:11.966+01:002014-09-07T20:59:11.966+01:00Could it be:
mc = minecraft.minecraft.creat()
sh...Could it be:<br /><br />mc = minecraft.minecraft.creat()<br /><br />should be:<br /><br />mc = minecraft.Minecraft.create()<br /><br />Note the capital M (python is case sensitive so upper and lower case letters make a difference and the missing e from createMartin O'Hanlonhttps://www.blogger.com/profile/03047799173301971515noreply@blogger.comtag:blogger.com,1999:blog-9007601562606157016.post-1886215272273477572014-09-07T12:56:43.451+01:002014-09-07T12:56:43.451+01:00Hello all. Total noob here. My son and i have been...Hello all. Total noob here. My son and i have been trying the real basics of tutorial but we get stuck pretty early on. <br /><br />Keep getting:<br /><br />AttributeError: 'module' object has no attribute 'minecraft'<br /><br />We're inputting<br /><br />import minecraft as minecraft<br />mc = minecraft.minecraft.creat()<br />mc.postToChat ("Hello Minecraft!")<br />import minecraft as minecraft<br /><br />Our Python program file is in the correct directroy (minecraft.magpi) and minecraft is running. Anonymoushttps://www.blogger.com/profile/15242141889245307732noreply@blogger.comtag:blogger.com,1999:blog-9007601562606157016.post-5513725171836165312014-04-16T18:18:56.426+01:002014-04-16T18:18:56.426+01:00You don't have to write it, particularly in a ...You don't have to write it, particularly in a script just for yourself. But it serves two purposes: For one, it indicates to the reader where the "main" routine actually starts. Secondly, if you define functions in your file, this lets you include the file from another one without having the "main" part execute, so you only get the function definitions.Vanessahttps://www.blogger.com/profile/05353637548899091553noreply@blogger.comtag:blogger.com,1999:blog-9007601562606157016.post-10917592255229002002014-04-16T11:41:58.546+01:002014-04-16T11:41:58.546+01:00Just a question... Why do you have to write
if __...Just a question... Why do you have to write <br />if __name__=__main__:???<br />because i never write this and my scripts work fine!samuelhttps://www.blogger.com/profile/13566453368539815004noreply@blogger.comtag:blogger.com,1999:blog-9007601562606157016.post-40546841998968389812014-03-05T15:10:16.976+00:002014-03-05T15:10:16.976+00:00You can, but you will need to install the bukkit p...You can, but you will need to install the bukkit plugin 'raspberry juice'. Check out my 'recipe' for creating a raspberry pi minecraft server.Martin O'Hanlonhttps://www.blogger.com/profile/03047799173301971515noreply@blogger.comtag:blogger.com,1999:blog-9007601562606157016.post-40111119970132287472014-02-15T15:59:22.228+00:002014-02-15T15:59:22.228+00:00I am being lazy by asking, but can I use what you ...I am being lazy by asking, but can I use what you are here with the Minecraft server here http://www.instructables.com/id/Raspberry-Pi-Minecraft-Server/?ALLSTEPSAnonymoushttps://www.blogger.com/profile/06086056778857440690noreply@blogger.comtag:blogger.com,1999:blog-9007601562606157016.post-5401184809207491582013-10-31T01:04:32.309+00:002013-10-31T01:04:32.309+00:00Hi, your getting the error because your program ca...Hi, your getting the error because your program cant connect to minecraft. When you say you are running the server, do you mean minecraft pi edition? Or are you running a full minecraft server? You need to start up minecraft pi edition, go into a game and then run your program. It doesnt matter that they are running on the same pi. Martin O'Hanlonhttps://www.blogger.com/profile/03047799173301971515noreply@blogger.comtag:blogger.com,1999:blog-9007601562606157016.post-28966348250616510252013-10-30T17:34:26.723+00:002013-10-30T17:34:26.723+00:00I am having problem to run minecraft-api.py. I rec...I am having problem to run minecraft-api.py. I receiving an error: Socket error in<br />line mc = minecraft.Minecraft.create()<br /><br />I run server on the same rasberry-pi. and it is in game. But i having connection error. <br />May be I should use other server then on rasberry pi?<br />Oksana Burkehttps://www.blogger.com/profile/00467043673932552501noreply@blogger.comtag:blogger.com,1999:blog-9007601562606157016.post-57507510809108081562013-07-18T04:05:29.105+01:002013-07-18T04:05:29.105+01:00Thank you Martin!!! :)Thank you Martin!!! :)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-9007601562606157016.post-36459223130899192262013-07-17T19:50:00.703+01:002013-07-17T19:50:00.703+01:00Im a bit short on time to make a video right now i...Im a bit short on time to make a video right now ill pit it on the list to do though. <br />In the meantime you might find this post useful which has install instructions and a walk through on how to get started. <br /><br />http://www.stuffaboutcode.com/2013/04/minecraft-pi-edition-api-tutorial.htmlMartin O'Hanlonhttps://www.blogger.com/profile/03047799173301971515noreply@blogger.comtag:blogger.com,1999:blog-9007601562606157016.post-7339790220113633002013-07-17T19:26:06.675+01:002013-07-17T19:26:06.675+01:00I am going to try and build Something which will b...I am going to try and build Something which will be HUGE!!!! but i have no idea of how to do it... ._. can you please make a video that explains how to install, run...ETC.<br />Thank you and i believe that it is a job well done!!!Anonymoushttps://www.blogger.com/profile/07738708950495690198noreply@blogger.comtag:blogger.com,1999:blog-9007601562606157016.post-17981100573456784332013-07-04T22:58:36.962+01:002013-07-04T22:58:36.962+01:00It might be that you wrote
minecraft.minecraft.cre...It might be that you wrote<br />minecraft.minecraft.create() instead of<br />minecraft.Minecraft.create ()Anonymoushttps://www.blogger.com/profile/10432837917544658645noreply@blogger.comtag:blogger.com,1999:blog-9007601562606157016.post-41573525557776195172013-07-04T22:56:11.450+01:002013-07-04T22:56:11.450+01:00Your problem is that you wrote
minecraft.minecraft...Your problem is that you wrote<br />minecraft.minecraft.create() instead of<br />minecraft.Minecraft.create ()Anonymoushttps://www.blogger.com/profile/10432837917544658645noreply@blogger.comtag:blogger.com,1999:blog-9007601562606157016.post-71760790958577493382013-05-21T21:56:02.665+01:002013-05-21T21:56:02.665+01:00Hi Nicholas, sorry its take me a while but I got r...Hi Nicholas, sorry its take me a while but I got round to looking at your program, very impressive, Ive video'd it and its uploading to youtube as we speak - plus a blog post at http://www.stuffaboutcode.com/2013/05/minecraft-pi-edition-2-games-by.htmlMartin O'Hanlonhttps://www.blogger.com/profile/03047799173301971515noreply@blogger.comtag:blogger.com,1999:blog-9007601562606157016.post-42220671325329578992013-05-16T16:25:34.243+01:002013-05-16T16:25:34.243+01:00Oh, well then that's okay. Thanks anyway!Oh, well then that's okay. Thanks anyway!Nicholas Harrishttps://www.blogger.com/profile/10647157439664975151noreply@blogger.comtag:blogger.com,1999:blog-9007601562606157016.post-13965056574789387992013-05-16T16:07:24.711+01:002013-05-16T16:07:24.711+01:00I will, it might be a next week though, busy times...I will, it might be a next week though, busy times. Get a video done though, get it on youtube, stick a link on MCPI or Raspberry PI sub-reddit's on reddit.com. See what people think.Martin O'Hanlonhttps://www.blogger.com/profile/03047799173301971515noreply@blogger.comtag:blogger.com,1999:blog-9007601562606157016.post-81393079638346084462013-05-16T16:04:44.886+01:002013-05-16T16:04:44.886+01:00Hey, are you still going to take a video of my pro...Hey, are you still going to take a video of my program? It's okay if you can't, I think I might be able to do it myself. :)Nicholas Harrishttps://www.blogger.com/profile/10647157439664975151noreply@blogger.comtag:blogger.com,1999:blog-9007601562606157016.post-34988162727173182802013-05-16T16:00:40.521+01:002013-05-16T16:00:40.521+01:00That makes sense. I was using Idle, and when I swi...That makes sense. I was using Idle, and when I switched to a different text editor it worked again.Nicholas Harrishttps://www.blogger.com/profile/10647157439664975151noreply@blogger.comtag:blogger.com,1999:blog-9007601562606157016.post-54496872720638587262013-05-16T15:56:06.218+01:002013-05-16T15:56:06.218+01:00Josh - I think you are experiencing this problem d...Josh - I think you are experiencing this problem due to using python 3 (i.e. IDLE 3) rather than python 2 (i.e. IDLE).Martin O'Hanlonhttps://www.blogger.com/profile/03047799173301971515noreply@blogger.comtag:blogger.com,1999:blog-9007601562606157016.post-89188856935856409962013-05-16T15:54:00.492+01:002013-05-16T15:54:00.492+01:00I finally worked out why you originally had proble...I finally worked out why you originally had problems... I found out by mistake, when I accidentally used IDLE 3 and python 3, rather than python 2 and IDLE.<br /><br />It seems there is some incompatibility, I'll work out what it is one day!Martin O'Hanlonhttps://www.blogger.com/profile/03047799173301971515noreply@blogger.com