Here's a step-by-step to get started scripting Minecraft with Python on Mac OSX
This file contains hidden or 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
| /* | |
| Copy this into the console of any web page that is interactive and doesn't | |
| do hard reloads. You will hear your DOM changes as different pitches of | |
| audio. | |
| I have found this interesting for debugging, but also fun to hear web pages | |
| render like UIs do in movies. | |
| */ | |
| const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
This file contains hidden or 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
| let opponentsmissile: game.LedSprite = null | |
| let missile: game.LedSprite = null | |
| let switchxposition = 0 | |
| let player = game.createSprite(2, 4) | |
| let nummissles = 0 | |
| input.onButtonPressed(Button.A, () => { | |
| player.change(LedSpriteProperty.X, -1) | |
| }) | |
| input.onButtonPressed(Button.B, () => { | |
| player.change(LedSpriteProperty.X, 1) |
This file contains hidden or 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
| { | |
| "red": { | |
| "50": "#ffebee", | |
| "100": "#ffcdd2", | |
| "200": "#ef9a9a", | |
| "300": "#e57373", | |
| "400": "#ef5350", | |
| "500": "#f44336", | |
| "600": "#e53935", | |
| "700": "#d32f2f", |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000