mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-11 20:11:18 +03:00
* Decompile LargeFeature, LargeCaveFeature. Add in game for testing.
* Rename Random::nextTLong to Random::nextLong
This commit is contained in:
26
source/World/Generator/LargeFeature.cpp
Normal file
26
source/World/Generator/LargeFeature.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#include "LargeFeature.hpp"
|
||||
|
||||
LargeFeature::LargeFeature()
|
||||
{
|
||||
}
|
||||
|
||||
LargeFeature::~LargeFeature()
|
||||
{
|
||||
}
|
||||
|
||||
void LargeFeature::apply(ChunkSource* csrc, Level* level, int x, int z, uint8_t* tiles, int unk)
|
||||
{
|
||||
m_random.setSeed(level->getSeed());
|
||||
|
||||
int r1 = 2 * (m_random.nextLong() / 2) + 1;
|
||||
int r2 = 2 * (m_random.nextLong() / 2) + 1;
|
||||
|
||||
for (int ax = x - m_radius; ax <= x + m_radius; ax++)
|
||||
{
|
||||
for (int az = z - m_radius; az <= z + m_radius; az++)
|
||||
{
|
||||
m_random.setSeed((r1 * ax + r2 * az) & level->getSeed());
|
||||
addFeature(level, ax, az, x, z, tiles, unk);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user