Skip to content

Instantly share code, notes, and snippets.

View reedacartwright's full-sized avatar
💭
I may be slow to respond.

Reed A. Cartwright reedacartwright

💭
I may be slow to respond.
View GitHub Profile
@reedacartwright
reedacartwright / randutils.hpp
Created December 19, 2020 01:52 — forked from imneme/randutils.hpp
Addresses common issues with C++11 random number generation; makes good seeding easier, and makes using RNGs easy while retaining all the power.
/*
* Random-Number Utilities (randutil)
* Addresses common issues with C++11 random number generation.
* Makes good seeding easier, and makes using RNGs easy while retaining
* all the power.
*
* The MIT License (MIT)
*
* Copyright (c) 2015 Melissa E. O'Neill
*
@reedacartwright
reedacartwright / bedrock_nether_roof.R
Last active July 21, 2025 13:09
Modify Minecraft Bedrock Edition Clients and Servers to Increase Nether Build Height
# Copyright 2021 Reed A. Cartwright <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
@reedacartwright
reedacartwright / nether_roof_readme.md
Last active May 4, 2025 22:18
Instructions for Building on Nether Roof in Minecraft Bedrock Edition

How to Build on the Nether Roof in Minecraft: Bedrock Edition

Bedrock Edition has a hardcoded nether height of 128 blocks. This means that even if you are able to glitch up on to the nether roof you cannot place blocks there. However, if you have access to bedrock_server.exe or Minecraft.Windows.exe you can hexedit these files to the increase the hardcoded nether height.

Video Tutorial

@reedacartwright
reedacartwright / blockstate_protocol.md
Created February 26, 2021 02:02 — forked from Tomcc/blockstate_protocol.md
Block Changes in Beta 1.2.13

Block Storage & Network Protocol Changes

Paletted chunks & removing BlockIDs brings a few big changes to how blocks are represented. In Bedrock, Blocks used to be represented by their 8 bit ID and 4 bit data; this means that we can only represent 256 blocks and 16 variants for each block. As it happens we ran out of IDs in Update Aquatic, so we had to do something about it :)

After this change, we can represent infinite types of Blocks and infinite BlockStates, just like in Java. BlockStates are what is sent over the network as they are roughly equivalent to the old ID+data information, eg. they're all the information attached to a block.

BlockStates are serialized in two ways:

PersistentID: a PersistentID is a NBT tag containing the BlockState name and its variant number; for example

@reedacartwright
reedacartwright / falling_time.csv
Created March 15, 2021 06:33
How long it takes for a mob to fall in Minecraft.
y ticks seconds
0 0 0
1 5 0.25
2 7 0.35
3 9 0.45
4 10 0.5
5 12 0.6
6 13 0.65
7 14 0.7
8 15 0.75
@reedacartwright
reedacartwright / find_wither_killer.cc
Created June 10, 2021 21:22
Source code for finding natural wither killers in bedrock edition.
#include <random>
#include <array>
#include <iostream>
using namespace std;
using mat_t = array<array<unsigned int, 32>, 32>;
uint32_t get_seed(int d, int x, int z) {
if(d == 0) {
@reedacartwright
reedacartwright / am_class2.R
Last active October 26, 2021 02:55
Introduction to Analyzing a Minecraft World, LIA 194 - Class 2
# Introduction to Analyzing a Minecraft World
# LIA 194 - Class #2
# We will be using the development branch of the rbedrock library,
# and will use devtools to install or update it.
if (!requireNamespace("devtools", quietly = TRUE)) {
install.packages("devtools")
}
devtools::install_github("reedacartwright/rbedrock")
@reedacartwright
reedacartwright / am_class4.R
Created November 7, 2021 04:06
Introduction to Analyzing a Minecraft World, LIA 194 - Class 4
## Today we are going to work on learning how to plot data with
## ggplot2, which is a part of tidyverse.
# Install the latest version of rbedrock
devtools::install_github("reedacartwright/rbedrock")
# Install tidyverse
install.packages("tidyverse")
# Load tidyverse and rbedrock
@reedacartwright
reedacartwright / am_class7.R
Last active January 7, 2022 02:57
Plotting Biome using RBedrock
## Today we will work on making maps with ggplot2.
# Install the latest version of rbedrock
devtools::install_github("reedacartwright/rbedrock")
# Load tidyverse and rbedrock
library(tidyverse)
library(rbedrock)
# Open World Database
@reedacartwright
reedacartwright / ga-pipeline-1.md
Last active March 31, 2022 01:07
Instructions for creating a genomic analysis pipleine using Github and a reproducable directory structure

After creating your repository on Github, you need to clone it to Agave. Don't forget to use the correct github url for your repository.

$ cd ~/dc_workshop
$ git clone [email protected]:USERNAME/ga-pipeline-1.git ga-pipeline-1
$ cd ga-pipeline-1

Getting Raw Data