Skip to content

Instantly share code, notes, and snippets.

View M4GNV5's full-sized avatar

Jakob Löw M4GNV5

View GitHub Profile
@M4GNV5
M4GNV5 / mcassembly.cpl.js
Created August 28, 2015 00:14
TIS-100 like assembly language in vanilla Minecraft
import("util.command");
import("util.callAsync");
import("util.setTimeout");
import("chat.tellraw");
import("scoreboard");
static int base = 10; // try 2 or 16
static bool debug = false;
object cursor = @e[type=ArmorStand,name=cursor];
@M4GNV5
M4GNV5 / renderSine.cbjsscript.js
Last active August 29, 2015 14:25
sine rendering in vanilla minecraft using CPL
import("util.command");
import("math");
import("chat.tellraw");
fixed start = math.pi();
start *= -1; //start at -pi
fixed stop = math.pi(); //stop at pi
for(fixed i = start; i <= stop; i += 0.2)
@M4GNV5
M4GNV5 / Hack.ChatBot timezones
Created July 13, 2015 13:59
timzones the !time command of my Hack.Chat Bot supports
ACDT: Australian Central Daylight Time
ACST: Australian Central Standard Time
ACT: ASEAN Common Time
ADT: Atlantic Daylight Time
AEDT: Australian Eastern Daylight Time
AEST: Australian Eastern Standard Time
AFT: Afghanistan Time
AKDT: Alaska Daylight Time
AKST: Alaska Standard Time
AMST: Armenia Summer Time
@M4GNV5
M4GNV5 / 99bottles
Last active August 29, 2015 14:24
99bottles CommandblocksJS
var bottles = new Runtime.Integer();
bottles.set(99);
Chat.Tellraw.create("99 bottles of beer on the wall, 99 bottles of beer.").tell(Entities.Selector.AllPlayer);
var repeat = function()
{
Chat.Tellraw.create("Take one down and pass it around, ", bottles.toTellrawExtra(), " bottles of beer on the wall.").tell(Entities.Selector.AllPlayer);
Chat.Tellraw.create(bottles.toTellrawExtra(), " bottles of beer on the wall, ", bottles.toTellrawExtra(), " bottles of beer.").tell(Entities.Selector.AllPlayer);
bottles.remove(1);
@M4GNV5
M4GNV5 / Brainfuck Interpreter.ts
Last active March 22, 2017 12:37
Brainfuck interpreter using CommandblocksJS
//why js? cuz i can and vs needs so long to load
//and yolo ;)
//
//setup
//
command("gamerule commandBlockOutput false");
command("gamerule sendCommandFeedback false");
command("fill 1 31 0 1 10 30 stone");
@M4GNV5
M4GNV5 / Hello World
Last active August 29, 2015 14:20
Hello World BinaryLang
0000 00000001 01101000
0010 00000001
0000 00000001 01100101
0010 00000001
0000 00000001 01101100
0010 00000001
0000 00000001 01101100