Skip to content

Instantly share code, notes, and snippets.

@torralbaa
torralbaa / plugins.c
Last active July 24, 2020 17:11
E(P)API: environ (Plugin) API.
/*
* plugins.c
*
* Copyright 2020 Alvarito050506 <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
@torralbaa
torralbaa / README.md
Last active June 11, 2022 00:54
Minecraft Pi Patched.

MCPI Patched

How to use this patch?

First, you'll need to make sure you have libsdl2-dev and libopengl-dev installed:

sudo apt-get install -y libsdl2-dev libopengl-dev

If the second isn't avaiable, install libgl-dev.

Then compile it as following:

@torralbaa
torralbaa / dice.js
Last active November 15, 2020 13:07
Dice in JavaScript with an (aprox.) 49.7%-50.3% distribution.
function dice()
{
var seed = Date.now() * 11 ^ ~31;
var a = seed << 8;
var b = seed << 16;
var c = seed << 32;
var d = seed << 64;
a = a ^ b;
b = b ^ c;
c = c ^ d;
@torralbaa
torralbaa / items.h
Last active February 14, 2021 15:02 — forked from TheBrokenRail/item.cpp
MCPI items/tiles
void* shovelIron = 0x17ba64;
void* pickaxeIron = 0x17ba68;
void* hatchetIron = 0x17ba6c;
void* flintAndSteel = 0x17ba70;
void* apple = 0x17ba74;
void* arrow = 0x17a878;
void* emerald = 0x17ba80;
void* ingotIron = 0x17ba84;
void* ingotGold = 0x17ba88;
void* swordIron = 0x17ba8c;
@torralbaa
torralbaa / README.md
Last active May 27, 2021 15:43
MCPI-Reborn Dockerless build.

Minecraft Pi Reborn - Dockerless build

Warnings

Only for RPis - Tested on a RPi 4B - You still need Full/Fake KMS - Not magic. Conflicts with minecraft-pi-reborn-* Unsupported - Use at your own risk.

Script(s) to build MCPI-Reborn without Docker.

dockerless-build.sh gets MCPI-Reborn, applies some patches (in the dockerless.diff file, you have to download it too), and builds it without the Docker dependency. The resulting DEB will be placed under minecraft-pi-reborn. Then you can install it and run minecraft-pi or try to use MCPIL to launch it (it should be compatible).