Skip to content

Instantly share code, notes, and snippets.

View extremeheat's full-sized avatar
🔶

extremeheat

🔶
View GitHub Profile
@extremeheat
extremeheat / compressed.js
Last active November 14, 2015 05:16
re-implement select-based driver picking on downloadcenter.intel.com
javascript:$("#searchModule").after('<div id="findCategoryModule" class="findCategoryModule primary-content-box" style="display: none;"> <h2>Find By Category</h2> <div class="selector active"> <label for="prodFam" id="prodFamLabel" class="select-category-txt active"> 1. </label> <select id="prodFam" name="prodFam"><option value="">Select a product family</option><option value="24">Processors</option><option value="36">Desktop Boards</option><option value="37">Server Products</option><option value="38">Network Connectivity</option><option value="39">Graphics Drivers</option><option value="42">Software</option><option value="44">Embedded Components</option><option value="45">PC Accessories</option><option value="1093">Programs and Services</option><option value="1783">Wireless Networking</option><option value="2273">I/O Products</option><option value="2280">Ethernet Components</option><option value="3124">Solid-State Drives</option><option value="3796">Education</option><option value="3865">Boards and Kits</opt
@extremeheat
extremeheat / 0001-Keep-better-track-of-inventory-changes-on-Windows-10.patch
Last active September 11, 2018 13:42
Various Minecraft: Windows 10 Edition-related patches for PocketMine-MP. Must be applied consecutively.
From ee6d6a6154ce35a4945add6aa6bd57f2144b185c Mon Sep 17 00:00:00 2001
From: extremeheat <extreme@protonmail.ch>
Date: Sun, 24 Apr 2016 00:46:33 -0400
Subject: [PATCH 1/4] Keep better track of inventory changes on Windows 10
Edition, fix inventory moving issues
---
src/pocketmine/Player.php | 198 ++++++++++++++++++++-
.../inventory/SimpleTransactionGroup.php | 26 ++-
2 files changed, 221 insertions(+), 3 deletions(-)
---- PACKET: InteractPacket
---- PACKET: SetSpawnPositionPacket
---- PACKET: TextPacket
---- PACKET: CraftingEventPacket
---- PACKET: ClientToServerHandshakePacket
---- PACKET: DropItemPacket
---- PACKET: LoginPacket
---- PACKET: SetEntityLinkPacket
---- PACKET: RequestChunkRadiusPacket
---- PACKET: EntityEventPacket
@extremeheat
extremeheat / mcpe_dumped_proto_1.2.10.2.c
Created February 25, 2018 21:12
MCPE dumped protocol
// reading file '/Games/MinecraftPE/apks/1.2.10.2/disassem-all-disassem.txt'...
// read file.
00cbf9c8 <DisconnectPacket::getId() const@@Base>:
00cbf9e4 <DisconnectPacket::write(BinaryStream&) const@@Base>:
// cbf9e4: b5b0 push {r4, r5, r7, lr}
// cbf9e6: 4605 mov r5, r0
// cbf9e8: 460c mov r4, r1
// cbf9ea: 7b69 ldrb r1, [r5, #13]
@extremeheat
extremeheat / mcpe_proto_dumper.py
Created February 25, 2018 22:07
libminecraftpe objdump parser for MCPE network packets
import re
import json
LST_FILE = 'PATH_TO_OBJDUMPED_FILE'
def read_file(file_name):
file = open(file_name, 'r')
return file.readlines()
reading_packet_readwrite = False
template <unsigned int NBitsPerBlock, typename Word = unsigned int>
struct PalettedBlockStateStorage {
static const int wordByteSize = sizeof(Word)/*4*/;
static const int wordBitSize = wordByteSize * 8;
static const byte blocksPerWord = NAIVE_FLOOR(wordBitSize / NBitsPerBlock);
static const byte paddingPerWord = wordBitSize % NBitsPerBlock;
static const int wordsCount = NAIVE_CEIL(4096.0 / blocksPerWord);
@extremeheat
extremeheat / data.txt
Created May 1, 2018 05:41
minecraft 1.12 block states to minecraft 1.13 block states map
>python java113convgen.py
no blockstate for minecraft:air
$ minecraft:air => None
$ minecraft:stone[variant=stone] => minecraft:stone
$ minecraft:stone[variant=granite] => minecraft:granite
$ minecraft:stone[variant=smooth_granite] => minecraft:polished_granite
$ minecraft:stone[variant=diorite] => minecraft:diorite
$ minecraft:stone[variant=smooth_diorite] => minecraft:polished_diorite
$ minecraft:stone[variant=andesite] => minecraft:andesite
$ minecraft:stone[variant=smooth_andesite] => minecraft:polished_andesite
{
"potion_container_change": [
{
"ingredient": {
"id": 289
},
"input_item_id": 373,
"output_item_id": 438
},
{
@extremeheat
extremeheat / recipe-map.json
Created August 14, 2020 05:09
bedrock recipie map
[
{
"inp": [
"339,-1",
"345,-1"
],
"id": 0,
"out": "395,2"
},
{
@extremeheat
extremeheat / come_bot.py
Created June 22, 2021 08:49
mineflayer bot in python
from JSPyBridge import require, On
mineflayer = require('mineflayer')
pathfinder = require('mineflayer-pathfinder')
RANGE_GOAL = 1
BOT_USERNAME = 'python'
bot = mineflayer.createBot({
'host': '127.0.0.1',
'port': 25565,