Sunday 12 November 2023

How to get coding with Minecraft Pi on a Pi 5.

 


Here are the steps needed to get Minecraft Pi working a Pi:

1.When you chose which image you are going to install make sure its the 32 bit 64 bi doesn't work with Minecraft Pi.

2. Using terminal install PiApps by running the following command:

wget -qO- https://raw.githubusercontent.com/Botspot/pi-apps/master/install | bash


3.Once installed open PyApps > games > Minecraft Pi (modded) and install

4. Head to terminal again and paste the following command:

cd ~ cd Desktop git clone https://github.com/AdventuresInMinecraft/AdventuresInMinecraft-Pi

5. This should put a folder on your folder desktop called: AdventuresInMinecraft-Pi

6. Next go the following directory: AdventuresInMinecraft-Pi/MyAdventures/mcpi

7. Open the util.py file in Idle or equivalent IDE.

8. Locate the following line of code: collections.iterable and replace it with collections.abc.iterable

9. You should now be able to create, save and run MCPI code from the following folder:

/AdventuresInMinecraft-Pi/MyAdventures




Saturday 28 October 2023

Raspberry Pi 5

 




usecases 1 week in:

  • Marking work on Class notebook on office 365
  • whilst listening to you tube 
  • editing a blog 
  • organizing a raspberry jam 
  • responding to school email through office 365.


In summary 1 week in multi tasking on basic school and teacher based tasks are now completed on my pi 5 rather than my school laptop. There is inevitably things I have to do on m school laptop like accessing SIM's and other things but this Pi 5 is very much going to reduce my dependence and need to bring my Laptop  home. In summary so far Pi 5 and not even over clocked is a game changer....



Over!

Monday 16 May 2022

Craig and Dave videos student recall questions....

Hi all, 

I'm attempting to train my year 12 GCE CS students into watching the Craig and Dave videos before they attend lessons to free up more time for coding and so they have some concept before attending the lesson. Craig and Dave promote this flipped learning approach and Alan O D has been talking about it for many years. As part of this process I have been trawling through videos of recent topics and posting questions based the videos as evidence that they have actually done this and to serve as useful notes these are the few that I have done so far are green........

Link to github for files 

1.4.2 Data Structures YT playlist

(a) Arrays (of up to 3 dimensions), records, lists, tuples. 

(b) The following structures to store data: linked-list, graph (directed and undirected), stack, queue, tree, binary search tree, hash table. 

(c) How to create, traverse, add data to and remove data from the data structures mentioned above. (NB this can be either using arrays and procedural programming or an object-oriented approach).

Files are are to download from here:


2.2.2 Computational methods YT playlist

(a) Features that make a problem solvable by computational methods.

 (b) Problem recognition.

 (c) Problem decomposition. 

(d) Use of divide and conquer.

 (e) Use of abstraction. 

(f) Learners should apply their knowledge of:

 • backtracking 

• data mining 

• heuristics 

• performance modelling

 • pipelining 

• visualisation to solve problems


2.3.1 Algorithms (Youtube playlist)


(c) Measures and methods to determine the efficiency of different algorithms, Big O notation (constant, linear, polynomial, exponential and logarithmic complexity). 

(d) Comparison of the complexity of algorithms.

Wednesday 7 April 2021

Whack a block Pixel Art

 

#colours

# Orange

# Pink / Skin

# Green

# White

# Red

# Sky blue / cyan

# Brown

# DARK GREEN

# Black


#faces


#@kari lawlor

Creeper = [

[DG, DG, DG, DG, DG, DG, DG, DG],

[DG, BL, BL, DG, DG, BL, BL, DG],

[DG, BL, BL, DG, DG, BL, BL, DG],

[DG, DG, DG, BL, BL, DG, DG, DG],

[DG, DG, BL, BL, BL, BL, DG, DG],

[DG, DG, BL, BL, BL, BL, DG, DG],

[DG, DG, BL, DG, DG, BL, DG, DG],

[DG, DG, DG, DG, DG, DG, DG, DG],

]


#Pig 


#Alex



#print pixel art

#By @KariLawler (Twitter)

def print_PixelArt(List):

    block = 35 # wool

    x, y, z = mc.player.getPos()

    pixel_y = y + len(List) - 1

    pixel_z = z - 6

    for row in List:

        pixel_x = x

        for pixel in row:

            if pixel > -1:

                mc.setBlock(pixel_x, pixel_y, pixel_z, block, pixel)

            pixel_x += 1

        pixel_y -= 1


mc.postToChat("Please hit the TNT block")


while True:


    evs = mc.events.pollBlockHits()

    for e in evs:

        pos = e.pos


        block = mc.getBlock(pos.x, pos.y, pos.z)


        if block == 46:#TNT

            mc.postToChat("Creeper")

            print_PixelArt(Creeper)

        elif block == 20:#glasselse:

            mc.postToChat("Other block")


        


Tuesday 29 December 2020

Rainbow Road

   



Rainbow Road

In order to get the below code you will need to follow these blogs in order to get started:

Setting up the server link

My first code link

In this code you will use the following skills:

+Import code from libraries

+Create a connection to the Minecraft server(local on this pc only)

+Create a procedure to draw/drop a rainbow road beneath your feet every time that you move

Coding key skills

Selection

Iteration

Sequence

Data Structures(Lists)

Variables

Data Structures(2D arrays)

Input

Output

Logical Operators

Mathematical operators

String manipulation

Functions

Procedures

File handling

 

 

Instructions:

 Follow the steps below and you will get there pretty quickly:

1.Open Idle

2.Click on “File” > “New File”

3.Type out the following code

In the Adventures with Minecraft folder click on “Start Server”



5.At this point press enter and the following should happen….






7. Next press enter...then this should happen.....









 9. Next on Minecraft select “Multiplayer”.









9.Then type in "local host"









10.Type in local host and hit the “join server” button.


11. Press “Esc” on the keyboard to allow yourself to quickly pop back to IDLE so you can save and run your code.

12. In IDLE “File” >> “Save As” >> Call it “Rainbow road.py”

13. For it to work you will need to save it in a specific folder which is:

“AIMStarterKitPC\AdventuresInMinecraft-PC\MyAdventures”

Like I have here:














14. Still in IDLE select “Run” >> “Run Module”

15. Head back to Minecraft and you should see your code in action:

16. To kill the code / stop I from working you will need to press “Esc” >>> find this window in IDLE then close it down. See below:



 

Sunday 20 December 2020

Forcefield

  



Forcefield

Before we go any further this code was originally created by Elton Lane(@piinthesky2015) a few years back as part of a Minecraft coding resource pack that I curated called the "hackpack" see link. He has kindly said that he doesn't mind me reusing this code for this Java coding retake on Minecraft Python coding. This code will allow you to bore big chunks out of the landscape. See the demo video at the bottom for a demo of it in use.   

In order to get the below code to work you will need to follow these blogs in order to get started:

Setting up the server link

My first code link

In this code you will use the following skills:

+Import code from libraries

+Create a connection to the Minecraft server(local on this pc only)

+Create a procedure to draw a air "forcefield"

+ Using parameters 

+Conditional statements 


Coding key

Selection

Iteration

Sequence

Data Structures(Lists)

Variables

Data Structures(2D arrays)

Input

Output

Logical Operators

Mathematical operators

String manipulation

Functions

Procedures

File handling

 

 

Instructions:

 Follow the steps below and you will get there pretty quickly:

 

1.Open Idle

2.Click on “File” > “New File”

3.Type out the following code


4.In the Adventures with Minecraft folder click on “Start Server”




5.At this point press enter and the following should happen….






7. Next press enter...then this should happen.....









 9. Next on Minecraft select “Multiplayer”.









9.Then type in "local host"









10.Type in local host and hit the “join server” button.


11. Press “Esc” on the keyboard to allow yourself to quickly pop back to IDLE so you can save and run your code.

12. In IDLE “File” >> “Save As” >> Call it “Forcefield.py”

 

13. For it to work you will need to save it in a specific folder which is:

“AIMStarterKitPC\AdventuresInMinecraft-PC\MyAdventures”

Like I have here you can see three example programs:














14. Still in IDLE select “Run” >> “Run Module”

15. Head back to Minecraft and you should see your code in action:

 


16. To kill the code / stop I from working you will need to press “Esc” >>> find this window in IDLE then close it down. See below:



 



Tuesday 24 November 2020

25 Hacks of Christmas 2020

 



Source to above image: link
Over the next month I shall be recycling existing blogs and maybe a few new ones to look at 25 different coding experiments with Minecraft and code, across a range of platforms and formats. At least 5-7 new blogs from 2020 and more to come.


Day 1: Minecraft Education Edition: MakeCode Getting started........Link

Day 2: Day Getting started with Minecraft Java edition coding. link 

Day 2.5: (Test it out :)): Day My first code with Minecraft Java Edition and Python .... link

Day 3: Getting started with BitIO and Minecraft....... Link

Day 4: BitIO and Minecraft 'Tilting Rainbow Road'......... Link

Day 5: EduBlocks  and Minecraft getting started............ Link

Day 6: EduBlocks  and Minecraft ...........Amen to walking blocks............Link


Day 7: BitIO  and Minecraft 'Touching pins takes you places'...........Link


Day 8: Edublocks / BitIO and Minecraft..........The Liverpool Makefest Minecraft Pixel art Twitter bot........... Link


Day 9: BitIO and MInecraft  ''Minecraft CPU temperature graphing" link

Day 10: Whack a block,  with Minecraft Java Edition and Python link


Day 11: Minecraft Education Edition My First Command Block.......Link

Day 12: BitIO and Minecraft : PixelCraft.......Link

Day 13: Minecraft Education Edition: Give inventory and changing weather.......Link
 


Day 14: Day Walking Random blocks with Minecraft Java Edition and Python link

Day 15: M:EE MakeCode 'Get coding'........Link
 


Day 16: BitIO and Minecraft 'Scalable Housing'..........Link

Day 17: 
Minecraft Education Edition:MakeCode 'Wool Wall'........Link

Day 18: Raspberry Pi and Minecraft: Pixel Cakes(RPI big birthday weekend resource)
...................link

Day 19: 
Raspberry Pi and Minecraft: Pixel Craft 2.0......Link

Day 20: 
Raspberry Pi and Minecraft: Experiments with GPIO triggers and Minecraft
.......Link

Day 21: 
Minecraft Education Edition: Vertical farming ......Link 

Day 22: 
Raspberry Pi and Minecraft: GPIO zero Minecraft "Whack on board Led's"
........Link

Day 23: Forcefield, 
with Minecraft Java Edition and Python link

Day 24: Rainbow Road with Minecraft Java Edition and Python link

Day 25: TBA