Here, we talked about this in our DM's.hotcrystal0 wrote: July 7th, 2025, 6:08 pm I know it has been two years since the last post, but this post is worth it.
I thought of an interesting idea for a custom Catagolue symmetry involving Minecraft:
1. Take a seed and isolate a radius of chunks around spawn
2. Treat slime chunks as ON cells and non-slime chunks as OFF cells
3. Upload the “soup” to Catagolue
Can someone actually make this?
slimechunk.h
Code: Select all
#pragma once
#include <stdint.h>
#include <stdbool.h>
bool is_slime_chunk(int64_t world_seed, int x_chunk, int z_chunk);
Code: Select all
#include <stdint.h>
#include <stdbool.h>
bool is_slime_chunk(int64_t world_seed, int x_chunk, int z_chunk) {
uint64_t slime_seed = world_seed +
((uint64_t)x_chunk * x_chunk * 0x4C1906) +
((uint64_t)x_chunk * 0x5AC0DB) +
((uint64_t)z_chunk * z_chunk * 0x4307A7) +
((uint64_t)z_chunk * 0x5F24F);
uint64_t internal_state = (slime_seed ^ 0x5E434E432ULL) & 0xFFFFFFFFFFFFULL;
uint64_t advanced_state = (internal_state * 0x5DEECE66DULL + 0xBULL) & 0xFFFFFFFFFFFFULL;
return ((advanced_state >> 17) % 10) == 0;
}Code: Select all
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <unistd.h>
#include <getopt.h>
#include "slimechunks.h"
void print_rle(int64_t seed, int width, int height, int start_x, int start_z) {
printf("# Seed: %ld\n", seed);
printf("x = %d, y = %d, rule = B3/S23\n", width, height);
char *rle_buffer = malloc(width * 2 + 2);
if (!rle_buffer) return;
int total_chars = 0;
for (int z = 0; z < height; z++) {
int rle_ptr = 0;
int x = 0;
while (x < width) {
bool is_slime = is_slime_chunk(seed, start_x + x, start_z + z);
char type = is_slime ? 'o' : 'b';
int count = 0;
while (x < width && is_slime_chunk(seed, start_x + x, start_z + z) == is_slime) {
count++;
x++;
}
if (count > 1) {
rle_ptr += sprintf(&rle_buffer[rle_ptr], "%d%c", count, type);
} else {
rle_ptr += sprintf(&rle_buffer[rle_ptr], "%c", type);
}
}
rle_buffer[rle_ptr++] = (z == height - 1) ? '!' : '$';
rle_buffer[rle_ptr] = '\0';
for (int i = 0; i < rle_ptr; i++) {
putchar(rle_buffer[i]);
if (++total_chars >= 70) {
putchar('\n');
total_chars = 0;
}
}
}
if (total_chars > 0) putchar('\n');
putchar('\n');
free(rle_buffer);
}
int main(int argc, char *argv[]) {
int64_t start_seed = 0;
int64_t end_seed = -1;
int width = 10;
int height = 10;
int start_x = 0;
int start_z = 0;
int opt;
static struct option long_options[] = {
{"seed", required_argument, 0, 's'},
{"end-seed", required_argument, 0, 'e'},
{"width", required_argument, 0, 'w'},
{"height", required_argument, 0, 'H'},
{"corner", required_argument, 0, 'c'},
{0, 0, 0, 0}
};
while ((opt = getopt_long(argc, argv, "s:e:w:H:c:", long_options, NULL)) != -1) {
switch (opt) {
case 's': start_seed = atoll(optarg); break;
case 'e': end_seed = atoll(optarg); break;
case 'w': width = atoi(optarg); break;
case 'H': height = atoi(optarg); break;
case 'c':
start_x = atoi(optarg);
if (optind < argc && argv[optind][0] != '-') {
start_z = atoi(argv[optind++]);
}
break;
}
}
if (end_seed < start_seed) end_seed = start_seed;
for (int64_t s = start_seed; s <= end_seed; s++) {
print_rle(s, width, height, start_x, start_z);
}
return 0;
}Code: Select all
$ gcc -Wall -Wextra -march=native -O3 -o slimechunks_stdin slimechunks_stdin.c slimechunks.cCode: Select all
options:
-h, --help show this help message and exit
-s SEED, --seed SEED Starting world seed (default: 0)
-e END_SEED, --end-seed END_SEED
End world seed for range processing
-w WIDTH, -x WIDTH, --width WIDTH
Width in chunks
-H HEIGHT, -z HEIGHT, --height HEIGHT
Height in chunks
-c CORNER CORNER, --corner CORNER CORNER
Top-left chunk coordinates (x z)
Code: Select all
./slimechunks_stdin -s start -e end -w 64 -H 64 | apgsearch_exec_with_symmetry_slimechunks_stdinI searched up to 1000000.