Skip to content

Instantly share code, notes, and snippets.

#include <Windows.h>
#include <stdint.h>
#include <Psapi.h>
#include "MinHook.h"
// Base address
static uintptr_t BaseAddress;
HANDLE process;
uintptr_t SlideAddress(uintptr_t offset) {
return BaseAddress + offset;
@jocopa3
jocopa3 / HookByName.cpp
Last active March 4, 2016 19:51
Added extra check
#include <Windows.h>
#include <iostream>
#include "MinHook.h"
// Hooks a function at a given address given the hook function and trampoline function
BOOL setHook(LPVOID* origAddress, LPVOID* hookFunction, LPVOID* trampFunction)
{
if (MH_CreateHook(origAddress, hookFunction, reinterpret_cast<LPVOID*>(trampFunction)) != MH_OK)
{
return FALSE;
@jocopa3
jocopa3 / TextureMod.cpp
Last active March 8, 2016 15:07
Reroutes any attempts made by Minecraft Win10 to access resources/textures to a folder in AppData
#include <Windows.h>
#include <atlbase.h>
#include <Shlobj.h>
#include <string>
#include "MinHook.h"
std::wstring MINECRAFT_LOCAL_PATH;
// Hooks a function at a given address given the hook function and trampoline function
BOOL setHook(LPVOID* origAddress, LPVOID* hookFunction, LPVOID* trampFunction)
/*
This exports vtable entry symbols to a file.
Run this in the IDA Script Command window (File->Script Command...)
Each vtable segment in the output file is separated by an empty line.
*/
#include <idc.idc>
static getPointerAddress(loc)
@jocopa3
jocopa3 / Enity.h
Last active June 28, 2016 06:04
Entity structure in 0.15.0
struct Entity
{
DWORD_PTR vtablePointer; //0x0000
DWORD unkInt0; //0x0008 ?
Vec3 pos; //0x000C Position
Vec3 oldPos; //0x0018 Old Position?
Vec3 somePos; //0x0024 Old Old Position?
Vec3 vel; //0x0030 Velocity
Vec2 rot; //0x003C Rotation
Vec2 oldRot; //0x0044 Rotation Old?
// Class wich emulates MCW10 32-byte strings
// Super basic
class String
{
union {
char charBuffer[16];
char* charPtr;
};
size_t Length = 0;
@jocopa3
jocopa3 / MinecraftOptions.cpp
Last active October 13, 2016 16:48
Options Class for MCW10 as of 0.15.10.
class String
{
public:
union {
char charBuffer[16];
char* charPtr;
};
size_t Length;
size_t MaxCapacity;
@jocopa3
jocopa3 / Options.cpp
Last active May 9, 2022 01:17
Minecraft Win10 0.16.0 Options Struct
class Options;
class String;
class GamePadRemappingLayout;
class KeyboardRemappingLayout;
class StringPtr;
enum InputMode {
Unknown = 0, // Not used
Mouse = 1,
Touch = 2,
@jocopa3
jocopa3 / components.txt
Created October 24, 2016 02:21
Components from 0.16.0 B4
Behaviors:
minecraft:behavior.avoid_mob_type
minecraft:behavior.beg
minecraft:behavior.break_door
minecraft:behavior.breed
minecraft:behavior.controlled_by_player
minecraft:behavior.defend_village_target
minecraft:behavior.door_interact
minecraft:behavior.eat_block
minecraft:behavior.enderman_leave_block
@jocopa3
jocopa3 / MCPE_1.1.0.1_Ids.txt
Last active December 20, 2023 07:15
List of all Blocks/Items/Entity Id's in MCPE/Win10 1.1.0.1 and EDU Edition
For advanced users, a syntax highlighter for sublime text and
textmate which makes reading the list easier can be found here:
https://gist.github.com/jocopa3/e4a35921e4f978572e7f45360d231f37
============ Blocks ============
All blocks as found in the 1.1.0.0 Block::initBlocks function.
Block names are the same names used in the /give command.
Name Id Data