{"id":69,"date":"2018-08-18T10:23:51","date_gmt":"2018-08-18T10:23:51","guid":{"rendered":"http:\/\/learnlearn.uk\/raspberrypi\/?p=69"},"modified":"2019-02-10T09:37:46","modified_gmt":"2019-02-10T09:37:46","slug":"code-castle-minecraft-using-python","status":"publish","type":"post","link":"https:\/\/learnlearn.uk\/raspberrypi\/2018\/08\/18\/code-castle-minecraft-using-python\/","title":{"rendered":"How to code a Castle in Minecraft using Python"},"content":{"rendered":"<h3>Introduction<\/h3>\n<p>In this video tutorial you learn how to code a castle in Minecraft, using Python coding.<\/p>\n<p>This tutorial shows you the power and simplicity of loops, as well as the the benefit of putting your code in to functions so that you do have to code the same thing over and over again.<\/p>\n<p>In order to complete this tutorial you need to use either:<\/p>\n<ul>\n<li>Raspberry Pi with NOOBs installed (No extra things need installing)<\/li>\n<li>A Windows pc with Minecraft and Forge install. <a href=\"https:\/\/www.instructables.com\/id\/Python-coding-for-Minecraft\/\">See this page<\/a> for how to install forge.<\/li>\n<\/ul>\n<h3>Video Tutorial<\/h3>\n<p>Here is the full Minecraft Python tutorial. Make sure you watch and listen to the video as it explains quite a lot as well as just adding code!<\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/l84dvUU4j_A\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<h3>Stretch Challenges<\/h3>\n<p>Finished the tutorial? Here are a few challenges to add to your project!<\/p>\n<ul>\n<li>Add a Keep in the centre of the castle<\/li>\n<li>Add a moat<\/li>\n<li>Add a working drawbridge<\/li>\n<li>Add some <a href=\"http:\/\/learnlearn.uk\/raspberrypi\/2018\/01\/10\/coding-house-minecraft-using-python\/\">houses<\/a> outside or inside your castle.<\/li>\n<\/ul>\n<h3>Subscribe<\/h3>\n<p>Like my tutorials? Make sure you click the subscribe link for more videos! \ud83d\ude42<br \/>\n<script src=\"https:\/\/apis.google.com\/js\/platform.js\"><\/script><\/p>\n<div class=\"g-ytsubscribe\" data-channelid=\"UCvzzakehMtYuw7Oql4zUlJg\" data-layout=\"full\" data-count=\"default\"><\/div>\n<p>&nbsp;<\/p>\n<h3>Full Code<\/h3>\n<p>Here is the full code below. Make sure that you watch the video, don&#8217;t just copy the code below, you will learn much much more!<\/p>\n<p><script src=\"https:\/\/gist.github.com\/richardbwest\/8c83daf1683a4340040b6b5377ff58fc.js\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Instantly build your very own castle, anywhere in Minecraft using a Python.<\/p>\n","protected":false},"author":1,"featured_media":71,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":70,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":""},"categories":[3],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to code a Castle in Minecraft using Python - LearnLearn Raspberry Pi Hacking<\/title>\n<meta name=\"description\" content=\"A free step by step video tutorial showing you how to code a castle in Minecraft using Python. Full code included. Works on Raspberry Pi and Windows.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/learnlearn.uk\/raspberrypi\/2018\/08\/18\/code-castle-minecraft-using-python\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to code a Castle in Minecraft using Python - LearnLearn Raspberry Pi Hacking\" \/>\n<meta property=\"og:description\" content=\"A free step by step video tutorial showing you how to code a castle in Minecraft using Python. Full code included. Works on Raspberry Pi and Windows.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/learnlearn.uk\/raspberrypi\/2018\/08\/18\/code-castle-minecraft-using-python\/\" \/>\n<meta property=\"og:site_name\" content=\"LearnLearn Raspberry Pi Hacking\" \/>\n<meta property=\"article:published_time\" content=\"2018-08-18T10:23:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-02-10T09:37:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/learnlearn.uk\/raspberrypi\/wp-content\/uploads\/sites\/17\/2018\/08\/thumbnail-youtube.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1680\" \/>\n\t<meta property=\"og:image:height\" content=\"1050\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"learnlearnadmin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"learnlearnadmin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/learnlearn.uk\/raspberrypi\/2018\/08\/18\/code-castle-minecraft-using-python\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/learnlearn.uk\/raspberrypi\/2018\/08\/18\/code-castle-minecraft-using-python\/\"},\"author\":{\"name\":\"learnlearnadmin\",\"@id\":\"https:\/\/learnlearn.uk\/raspberrypi\/#\/schema\/person\/37d61760b611e12d655e20de44b12f02\"},\"headline\":\"How to code a Castle in Minecraft using Python\",\"datePublished\":\"2018-08-18T10:23:51+00:00\",\"dateModified\":\"2019-02-10T09:37:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/learnlearn.uk\/raspberrypi\/2018\/08\/18\/code-castle-minecraft-using-python\/\"},\"wordCount\":213,\"publisher\":{\"@id\":\"https:\/\/learnlearn.uk\/raspberrypi\/#organization\"},\"articleSection\":[\"Minecraft\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/learnlearn.uk\/raspberrypi\/2018\/08\/18\/code-castle-minecraft-using-python\/\",\"url\":\"https:\/\/learnlearn.uk\/raspberrypi\/2018\/08\/18\/code-castle-minecraft-using-python\/\",\"name\":\"How to code a Castle in Minecraft using Python - LearnLearn Raspberry Pi Hacking\",\"isPartOf\":{\"@id\":\"https:\/\/learnlearn.uk\/raspberrypi\/#website\"},\"datePublished\":\"2018-08-18T10:23:51+00:00\",\"dateModified\":\"2019-02-10T09:37:46+00:00\",\"description\":\"A free step by step video tutorial showing you how to code a castle in Minecraft using Python. Full code included. Works on Raspberry Pi and Windows.\",\"breadcrumb\":{\"@id\":\"https:\/\/learnlearn.uk\/raspberrypi\/2018\/08\/18\/code-castle-minecraft-using-python\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/learnlearn.uk\/raspberrypi\/2018\/08\/18\/code-castle-minecraft-using-python\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/learnlearn.uk\/raspberrypi\/2018\/08\/18\/code-castle-minecraft-using-python\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/learnlearn.uk\/raspberrypi\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to code a Castle in Minecraft using Python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/learnlearn.uk\/raspberrypi\/#website\",\"url\":\"https:\/\/learnlearn.uk\/raspberrypi\/\",\"name\":\"LearnLearn Raspberry Pi Hacking\",\"description\":\"learnlearn.uk\",\"publisher\":{\"@id\":\"https:\/\/learnlearn.uk\/raspberrypi\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/learnlearn.uk\/raspberrypi\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/learnlearn.uk\/raspberrypi\/#organization\",\"name\":\"LearnLearn Raspberry Pi Hacking\",\"url\":\"https:\/\/learnlearn.uk\/raspberrypi\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/learnlearn.uk\/raspberrypi\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/learnlearn.uk\/raspberrypi\/wp-content\/uploads\/sites\/17\/2019\/02\/LearnLearnLogowhite.png\",\"contentUrl\":\"https:\/\/learnlearn.uk\/raspberrypi\/wp-content\/uploads\/sites\/17\/2019\/02\/LearnLearnLogowhite.png\",\"width\":710,\"height\":98,\"caption\":\"LearnLearn Raspberry Pi Hacking\"},\"image\":{\"@id\":\"https:\/\/learnlearn.uk\/raspberrypi\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/learnlearn.uk\/raspberrypi\/#\/schema\/person\/37d61760b611e12d655e20de44b12f02\",\"name\":\"learnlearnadmin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/learnlearn.uk\/raspberrypi\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/07a2ee7e04b8bee91a78709b019de541?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/07a2ee7e04b8bee91a78709b019de541?s=96&d=mm&r=g\",\"caption\":\"learnlearnadmin\"},\"url\":\"https:\/\/learnlearn.uk\/raspberrypi\/author\/learnlearnadmin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to code a Castle in Minecraft using Python - LearnLearn Raspberry Pi Hacking","description":"A free step by step video tutorial showing you how to code a castle in Minecraft using Python. Full code included. Works on Raspberry Pi and Windows.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/learnlearn.uk\/raspberrypi\/2018\/08\/18\/code-castle-minecraft-using-python\/","og_locale":"en_GB","og_type":"article","og_title":"How to code a Castle in Minecraft using Python - LearnLearn Raspberry Pi Hacking","og_description":"A free step by step video tutorial showing you how to code a castle in Minecraft using Python. Full code included. Works on Raspberry Pi and Windows.","og_url":"https:\/\/learnlearn.uk\/raspberrypi\/2018\/08\/18\/code-castle-minecraft-using-python\/","og_site_name":"LearnLearn Raspberry Pi Hacking","article_published_time":"2018-08-18T10:23:51+00:00","article_modified_time":"2019-02-10T09:37:46+00:00","og_image":[{"width":1680,"height":1050,"url":"https:\/\/learnlearn.uk\/raspberrypi\/wp-content\/uploads\/sites\/17\/2018\/08\/thumbnail-youtube.png","type":"image\/png"}],"author":"learnlearnadmin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"learnlearnadmin","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/learnlearn.uk\/raspberrypi\/2018\/08\/18\/code-castle-minecraft-using-python\/#article","isPartOf":{"@id":"https:\/\/learnlearn.uk\/raspberrypi\/2018\/08\/18\/code-castle-minecraft-using-python\/"},"author":{"name":"learnlearnadmin","@id":"https:\/\/learnlearn.uk\/raspberrypi\/#\/schema\/person\/37d61760b611e12d655e20de44b12f02"},"headline":"How to code a Castle in Minecraft using Python","datePublished":"2018-08-18T10:23:51+00:00","dateModified":"2019-02-10T09:37:46+00:00","mainEntityOfPage":{"@id":"https:\/\/learnlearn.uk\/raspberrypi\/2018\/08\/18\/code-castle-minecraft-using-python\/"},"wordCount":213,"publisher":{"@id":"https:\/\/learnlearn.uk\/raspberrypi\/#organization"},"articleSection":["Minecraft"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/learnlearn.uk\/raspberrypi\/2018\/08\/18\/code-castle-minecraft-using-python\/","url":"https:\/\/learnlearn.uk\/raspberrypi\/2018\/08\/18\/code-castle-minecraft-using-python\/","name":"How to code a Castle in Minecraft using Python - LearnLearn Raspberry Pi Hacking","isPartOf":{"@id":"https:\/\/learnlearn.uk\/raspberrypi\/#website"},"datePublished":"2018-08-18T10:23:51+00:00","dateModified":"2019-02-10T09:37:46+00:00","description":"A free step by step video tutorial showing you how to code a castle in Minecraft using Python. Full code included. Works on Raspberry Pi and Windows.","breadcrumb":{"@id":"https:\/\/learnlearn.uk\/raspberrypi\/2018\/08\/18\/code-castle-minecraft-using-python\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/learnlearn.uk\/raspberrypi\/2018\/08\/18\/code-castle-minecraft-using-python\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/learnlearn.uk\/raspberrypi\/2018\/08\/18\/code-castle-minecraft-using-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/learnlearn.uk\/raspberrypi\/"},{"@type":"ListItem","position":2,"name":"How to code a Castle in Minecraft using Python"}]},{"@type":"WebSite","@id":"https:\/\/learnlearn.uk\/raspberrypi\/#website","url":"https:\/\/learnlearn.uk\/raspberrypi\/","name":"LearnLearn Raspberry Pi Hacking","description":"learnlearn.uk","publisher":{"@id":"https:\/\/learnlearn.uk\/raspberrypi\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/learnlearn.uk\/raspberrypi\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/learnlearn.uk\/raspberrypi\/#organization","name":"LearnLearn Raspberry Pi Hacking","url":"https:\/\/learnlearn.uk\/raspberrypi\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/learnlearn.uk\/raspberrypi\/#\/schema\/logo\/image\/","url":"https:\/\/learnlearn.uk\/raspberrypi\/wp-content\/uploads\/sites\/17\/2019\/02\/LearnLearnLogowhite.png","contentUrl":"https:\/\/learnlearn.uk\/raspberrypi\/wp-content\/uploads\/sites\/17\/2019\/02\/LearnLearnLogowhite.png","width":710,"height":98,"caption":"LearnLearn Raspberry Pi Hacking"},"image":{"@id":"https:\/\/learnlearn.uk\/raspberrypi\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/learnlearn.uk\/raspberrypi\/#\/schema\/person\/37d61760b611e12d655e20de44b12f02","name":"learnlearnadmin","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/learnlearn.uk\/raspberrypi\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/07a2ee7e04b8bee91a78709b019de541?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/07a2ee7e04b8bee91a78709b019de541?s=96&d=mm&r=g","caption":"learnlearnadmin"},"url":"https:\/\/learnlearn.uk\/raspberrypi\/author\/learnlearnadmin\/"}]}},"rttpg_featured_image_url":{"full":["https:\/\/learnlearn.uk\/raspberrypi\/wp-content\/uploads\/sites\/17\/2018\/08\/thumbnail-youtube.png",1680,1050,false],"landscape":["https:\/\/learnlearn.uk\/raspberrypi\/wp-content\/uploads\/sites\/17\/2018\/08\/thumbnail-youtube.png",1680,1050,false],"portraits":["https:\/\/learnlearn.uk\/raspberrypi\/wp-content\/uploads\/sites\/17\/2018\/08\/thumbnail-youtube.png",1680,1050,false],"thumbnail":["https:\/\/learnlearn.uk\/raspberrypi\/wp-content\/uploads\/sites\/17\/2018\/08\/thumbnail-youtube-150x150.png",150,150,true],"medium":["https:\/\/learnlearn.uk\/raspberrypi\/wp-content\/uploads\/sites\/17\/2018\/08\/thumbnail-youtube-300x188.png",300,188,true],"large":["https:\/\/learnlearn.uk\/raspberrypi\/wp-content\/uploads\/sites\/17\/2018\/08\/thumbnail-youtube-1024x640.png",1024,640,true],"1536x1536":["https:\/\/learnlearn.uk\/raspberrypi\/wp-content\/uploads\/sites\/17\/2018\/08\/thumbnail-youtube.png",1536,960,false],"2048x2048":["https:\/\/learnlearn.uk\/raspberrypi\/wp-content\/uploads\/sites\/17\/2018\/08\/thumbnail-youtube.png",1680,1050,false],"medium_image_cropped":["https:\/\/learnlearn.uk\/raspberrypi\/wp-content\/uploads\/sites\/17\/2018\/08\/thumbnail-youtube-300x200.png",300,200,true],"neve-blog":["https:\/\/learnlearn.uk\/raspberrypi\/wp-content\/uploads\/sites\/17\/2018\/08\/thumbnail-youtube.png",930,581,false]},"rttpg_author":{"display_name":"learnlearnadmin","author_link":"https:\/\/learnlearn.uk\/raspberrypi\/author\/learnlearnadmin\/"},"rttpg_comment":0,"rttpg_category":"<a href=\"https:\/\/learnlearn.uk\/raspberrypi\/category\/minecraft\/\" rel=\"category tag\">Minecraft<\/a>","rttpg_excerpt":"Instantly build your very own castle, anywhere in Minecraft using a Python.","_links":{"self":[{"href":"https:\/\/learnlearn.uk\/raspberrypi\/wp-json\/wp\/v2\/posts\/69"}],"collection":[{"href":"https:\/\/learnlearn.uk\/raspberrypi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/learnlearn.uk\/raspberrypi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/raspberrypi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/raspberrypi\/wp-json\/wp\/v2\/comments?post=69"}],"version-history":[{"count":7,"href":"https:\/\/learnlearn.uk\/raspberrypi\/wp-json\/wp\/v2\/posts\/69\/revisions"}],"predecessor-version":[{"id":123,"href":"https:\/\/learnlearn.uk\/raspberrypi\/wp-json\/wp\/v2\/posts\/69\/revisions\/123"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/raspberrypi\/wp-json\/wp\/v2\/media\/71"}],"wp:attachment":[{"href":"https:\/\/learnlearn.uk\/raspberrypi\/wp-json\/wp\/v2\/media?parent=69"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/learnlearn.uk\/raspberrypi\/wp-json\/wp\/v2\/categories?post=69"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/learnlearn.uk\/raspberrypi\/wp-json\/wp\/v2\/tags?post=69"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}