forked from mirrors/kolyah35-minecraft-pe-0.6.1
Infinite world, LuaJIT mod API, WorldEdit port, skins and music
- Infinite world: streamed chunk cache, multi-region storage (old chunks.dat still loads), per-chunk entity/tile entity persistence, client chunk streaming, protocol version 10, view-distance server property - LuaJIT mod host (mods/, lua/prelude.lua) with events, commands, world and player API; WorldEdit command set ported to it (mods/worldedit) - /skin command, SetSkinPacket and bundled skins - OGG music player (data/music is ignored, tools/convert-music.ps1) - package-windows.ps1 builds client and dedicated server for Windows Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
db9f6c9f32
commit
110cb2a896
68 changed files with 5064 additions and 844 deletions
|
|
@ -512,16 +512,7 @@ float Tile::getBrightness( LevelSource* level, int x, int y, int z )
|
|||
bool Tile::shouldRenderFace( LevelSource* level, int x, int y, int z, int face )
|
||||
{
|
||||
if (face == 0 && y == -1) return false;
|
||||
// For fixed size worlds //@todo: external constants rather than magic numbers
|
||||
// @fixme @ahtung temp fix
|
||||
|
||||
auto xz = LevelConstants::CHUNK_CACHE_WIDTH == 16 ? 256 :
|
||||
LevelConstants::CHUNK_CACHE_WIDTH * LevelConstants::CHUNK_CACHE_WIDTH / (LevelConstants::CHUNK_CACHE_WIDTH * LevelConstants::CHUNK_CACHE_WIDTH / 256 / 2);
|
||||
|
||||
if (face == 2 && z == -1) return false;
|
||||
if (face == 3 && z == xz) return false;
|
||||
if (face == 4 && x == -1) return false;
|
||||
if (face == 5 && x == xz) return false;
|
||||
// The world is infinite, there is no edge whose outer faces could be skipped
|
||||
// Common
|
||||
if (face == 0 && yy0 > 0) return true;
|
||||
if (face == 1 && yy1 < 1) return true;
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ Vec3 NetherReactorTileEntity::getSpawnPosition( float minDistance, float varible
|
|||
void NetherReactorTileEntity::spawnEnemy() {
|
||||
Mob* mob = MobFactory::CreateMob(MobTypes::PigZombie, level);
|
||||
Vec3 enemyPosition = getSpawnPosition(3, 4, -1);
|
||||
while(enemyPosition.x < 0 || enemyPosition.z < 0 || enemyPosition.x >= LevelConstants::LEVEL_WIDTH || enemyPosition.z >= LevelConstants::LEVEL_DEPTH) {
|
||||
while(enemyPosition.x <= -LevelConstants::LEVEL_WIDTH || enemyPosition.z <= -LevelConstants::LEVEL_DEPTH || enemyPosition.x >= LevelConstants::LEVEL_WIDTH || enemyPosition.z >= LevelConstants::LEVEL_DEPTH) {
|
||||
enemyPosition = getSpawnPosition(3, 4, -1);
|
||||
}
|
||||
MobSpawner::addMob(level, mob, enemyPosition.x, enemyPosition.y, enemyPosition.z, 0, 0, true);
|
||||
|
|
@ -140,7 +140,7 @@ void NetherReactorTileEntity::spawnEnemy() {
|
|||
|
||||
void NetherReactorTileEntity::spawnItem() {
|
||||
Vec3 itemPosition= getSpawnPosition(3, 4, -1);
|
||||
while(itemPosition.x < 0 || itemPosition.z < 0 || itemPosition.x >= LevelConstants::LEVEL_WIDTH || itemPosition.z >= LevelConstants::LEVEL_DEPTH) {
|
||||
while(itemPosition.x <= -LevelConstants::LEVEL_WIDTH || itemPosition.z <= -LevelConstants::LEVEL_DEPTH || itemPosition.x >= LevelConstants::LEVEL_WIDTH || itemPosition.z >= LevelConstants::LEVEL_DEPTH) {
|
||||
itemPosition = getSpawnPosition(3, 4, -1);
|
||||
}
|
||||
ItemEntity* item = new ItemEntity(level, itemPosition.x, itemPosition.y, itemPosition.z, getSpawnItem());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue