Skip to content

Instantly share code, notes, and snippets.

View jose-vm's full-sized avatar

jose-vm jose-vm

View GitHub Profile
@jose-vm
jose-vm / mcpe_slime_chunks.java
Created July 5, 2016 07:15
Reverse engineered MCPE "slime-chunk" code; by @protolambda and @jocopa3
public static boolean isSlimeChunk(int cX, int cZ){
//
// MCPE slime-chunk checker
// From Minecraft: Pocket Edition 0.15.0 (0.15.0.50_V870150050)
// Reverse engineered by @protolambda and @jocopa3
//
// NOTE:
// - The world-seed doesn't seem to be incorporated into the randomness, which is very odd.
// This means that every world has its slime-chunks in the exact same chunks!
// Update: @_tomcc has confirmed in a reddit PM that this is "entirely possible!".
@jose-vm
jose-vm / gist:605bc2d435a58ea7e673
Created February 16, 2016 15:51 — forked from NiclasOlofsson/gist:f07edb6df8de8ebc3a90
MiNET login command in plugin.
[Plugin("CoreCommands", "The core commands for MiNET", "1.0", "MiNET Team")]
public class CoreCommands : Plugin
{
[Command]
public void Login(Player player, string password)
{
UserManager<User> userManager = player.Server.UserManager;
if (userManager != null)
{
if (player.Username == null) return;
public class TextEntity : Entity
{
public TextEntity(Level level, string text, Vector3 pos) : base(64, level)
{
NameTag = text;
KnownPosition = new PlayerLocation(pos);
HealthManager = new NoDamageHealthManager(this);
}
public override void OnTick()
#include <idc.idc>
static symbol(addr, sym) {
MakeFunction(addr, BADADDR);
if(MakeNameEx(addr, sym, SN_NOWARN)) return;
auto i;
for(i = 0; i < 999; i++) if(MakeNameEx(addr, form("%s_%d", sym, i), SN_NOWARN)) return;
}
static main() {