4 ms·
I haven't seen the code, obviously, but Minecraft has a lot of functionality similar to cellular automata. That is, checking the contents of adjacent cells. I
by teamonkey 12y ago
I haven't seen the code, obviously, but Minecraft has a lot of functionality similar to cellular automata. That is, checking the contents of adjacent cells.
I imagine the code went from
v1 = Cell.testPos(x-1,y,z);
v2 = Cell.testPos(x+1,y,z);
v3 = Cell.testPos(x,y-1,z);
...
To
v1 = Cell.testPos(new BlockPos(block.x-1,block.y,block.z));
v2 = Cell.testPos(new BlockPos(block.x+1,block.y,block.z));
v3 = Cell.testPos(new BlockPos(block.x,block.y-1,block.z));
...