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 / particles.txt
Created October 26, 2016 02:41
Complete particle name list for minecraft:projectile particle attribute
Particles:
- "bubble"
- "crit"
- "smoke"
- "explode"
- "evaporation"
- "flame"
- "lava"
- "largesmoke"
- "reddust"
@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 / main.cpp
Last active May 27, 2016 20:22
Clone of BlockLauncher code for Item.setProperties
static void setProperties(Item* item, const std::string& data) {
Json::Value& value = Json::Value((Json::ValueType) 0);
Json::Reader& reader = Json::Reader();
reader.parse(data, value, true);
item->init(value);
}
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
public static String getContents(String url, String encodeType) {
URL u;
StringBuilder builder = new StringBuilder();
try {
@jose-vm
jose-vm / LevelEventType.cs
Last active June 27, 2016 15:10
MCPE LevelEvents IDs
namespace MiNET
{
public enum LevelEventType : short
{
SoundClick = 1000,
SoundClickFail = 1001, // try also with data 1200 for Dispenser sound
SoundShoot = 1002,
SoundDoorClose = 1003, // spooky sound with data 20
SoundFizz = 1004,
SoundTNTFuse = 1005,
@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()
@jose-vm
jose-vm / Material.h
Last active November 16, 2015 05:21
#pragma once
class Material {
public:
int materialType; // 0, thanks to byteandahalf
bool isFlammable; // 4
bool isNeverBuildable; // 5, alt name: isSolidBlocking
bool isAlwaysDestroyable; // 6
bool isReplaceable; // 7
bool isLiquid; // 8
@jose-vm
jose-vm / main.cpp
Created October 16, 2015 23:21
File for MMB's Multilanguage Support
// Creeper
if (key == "mmb.creeper.type.name") {
return "Type";
}
if (key == "mmb.creeper.type.normal.name") {
return "Normal";
}
if (key == "mmb.creeper.type.charged.name") {
return "Charged";
}
#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() {