the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 26 lines 570 B view raw
1#include "stdafx.h" 2#include "BlockReplacements.h" 3#include "net.minecraft.world.level.tile.h" 4 5byteArray BlockReplacements::replacements = byteArray(256); 6 7void BlockReplacements::staticCtor() 8{ 9 for (int i = 0; i < 256; i++) 10 { 11 byte b = (byte) i; 12 if (b != 0 && Tile::tiles[b & 0xff] == NULL) 13 { 14 b = 0; 15 } 16 BlockReplacements::replacements[i] = b; 17 } 18} 19 20void BlockReplacements::replace(byteArray blocks) 21{ 22 for (unsigned int i = 0; i < blocks.length; i++) 23 { 24 blocks[i] = replacements[blocks[i] & 0xff]; 25 } 26}