mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Fixes
This commit is contained in:
parent
5cb23d8c4d
commit
6a73583f03
|
|
@ -1007,8 +1007,8 @@ void PreStitchedTextureMap::loadUVs()
|
|||
ADD_ICON(20, 12, L"granite");
|
||||
ADD_ICON(20, 13, L"alpha_grass_side");
|
||||
ADD_ICON(20, 14, L"alpha_grass_top");
|
||||
ADD_ICON(20, 15, L"alpha_leaves");
|
||||
ADD_ICON(20, 15, L"leaves_alpha");
|
||||
|
||||
ADD_ICON(21, 0, L"alpha_leaves_opaque");
|
||||
ADD_ICON(21, 0, L"leaves_alpha_opaque");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,10 +87,6 @@ void BiomeDecorator::_init()
|
|||
|
||||
void BiomeDecorator::decorate()
|
||||
{
|
||||
PIXBeginNamedEvent(0,"Decorate ores");
|
||||
decorateOres();
|
||||
PIXEndNamedEvent();
|
||||
|
||||
PIXBeginNamedEvent(0,"Decorate Islands");
|
||||
for (int i = 0; i < random->nextInt(3)-1; i++)
|
||||
{
|
||||
|
|
@ -101,6 +97,10 @@ void BiomeDecorator::decorate()
|
|||
}
|
||||
PIXEndNamedEvent();
|
||||
|
||||
PIXBeginNamedEvent(0,"Decorate ores");
|
||||
decorateOres();
|
||||
PIXEndNamedEvent();
|
||||
|
||||
PIXBeginNamedEvent(0,"Decorate sand/clay/gravel");
|
||||
for (int i = 0; i < sandCount; i++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ bool Bush::mayPlace(Level *level, int x, int y, int z)
|
|||
|
||||
bool Bush::mayPlaceOn(int tile)
|
||||
{
|
||||
return tile == Tile::grass_Id || tile == Tile::dirt_Id || tile == Tile::farmland_Id;
|
||||
return tile == Tile::grass_Id || tile == Tile::dirt_Id || tile == Tile::farmland_Id || tile == Tile::alphaGrass_Id;
|
||||
}
|
||||
|
||||
void Bush::neighborChanged(Level *level, int x, int y, int z, int type)
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ bool DyePowderItem::growCrop(shared_ptr<ItemInstance> itemInstance, Level *level
|
|||
}
|
||||
return true;
|
||||
}
|
||||
else if (tile == Tile::grass_Id)
|
||||
else if (tile == Tile::grass_Id || tile == Tile::alphaGrass_Id)
|
||||
{
|
||||
if(!bTestUseOnOnly)
|
||||
{
|
||||
|
|
@ -273,6 +273,11 @@ bool DyePowderItem::growCrop(shared_ptr<ItemInstance> itemInstance, Level *level
|
|||
{
|
||||
goto mainloop;
|
||||
}
|
||||
|
||||
if (level->getTile(xx, yy - 1, zz) != Tile::alphaGrass_Id || level->isSolidBlockingTile(xx, yy, zz))
|
||||
{
|
||||
goto mainloop;
|
||||
}
|
||||
}
|
||||
|
||||
if (level->getTile(xx, yy, zz) == 0)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ bool HoeItem::useOn(shared_ptr<ItemInstance> instance, shared_ptr<Player> player
|
|||
int targetType = level->getTile(x, y, z);
|
||||
int above = level->getTile(x, y + 1, z);
|
||||
|
||||
if (face != 0 && above == 0 && (targetType == Tile::grass_Id || targetType == Tile::dirt_Id))
|
||||
if (face != 0 && above == 0 && (targetType == Tile::grass_Id || targetType == Tile::dirt_Id || targetType == Tile::alphaGrass_Id))
|
||||
{
|
||||
if(!bTestUseOnOnly)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ bool IslandFeature::place(Level *level, Random *random, int x, int y, int z)
|
|||
int minY = y;
|
||||
int minZ = z;
|
||||
|
||||
int maxX = x + 16;
|
||||
int maxX = x + 24;
|
||||
int maxY = y + 8;
|
||||
int maxZ = z + 16;
|
||||
int maxZ = z + 24;
|
||||
|
||||
bool intersects = levelGenOptions->checkIntersects(minX, minY, minZ, maxX, maxY, maxZ);
|
||||
if(intersects)
|
||||
|
|
@ -48,9 +48,9 @@ bool IslandFeature::place(Level *level, Random *random, int x, int y, int z)
|
|||
int spots = random->nextInt(4) + 4;
|
||||
for (int i = 0; i < spots; i++)
|
||||
{
|
||||
double xr = random->nextDouble() * 6 + 3;
|
||||
double xr = random->nextDouble() * 8 + 8;
|
||||
double yr = random->nextDouble() * 4 + 2;
|
||||
double zr = random->nextDouble() * 6 + 3;
|
||||
double zr = random->nextDouble() * 8 + 8;
|
||||
|
||||
double xp = random->nextDouble() * (16 - xr - 2) + 1 + xr / 2;
|
||||
double yp = random->nextDouble() * (8 - yr - 4) + 2 + yr / 2;
|
||||
|
|
@ -110,69 +110,14 @@ bool IslandFeature::place(Level *level, Random *random, int x, int y, int z)
|
|||
level->setTileAndData(x + xx, y + yy+99+height, z + zz, Tile::dirt_Id, 0, Tile::UPDATE_CLIENTS);
|
||||
level->setTileAndData(x + xx, y + yy+98+height, z + zz, Tile::stone_Id, 0, Tile::UPDATE_CLIENTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int xx = 0; xx < 16; xx++)
|
||||
{
|
||||
for (int zz = 0; zz < 16; zz++)
|
||||
{
|
||||
for (int yy = 4; yy < 8; yy++)
|
||||
{
|
||||
if (grid[((xx) * 16 + (zz)) * 8 + (yy)])
|
||||
{
|
||||
if (level->getTile(x + xx, y + yy - 1, z + zz) == Tile::dirt_Id && level->getBrightness(LightLayer::Sky, x + xx, y + yy, z + zz) > 0)
|
||||
{
|
||||
Biome *b = level->getBiome(x + xx, z + zz);
|
||||
if (b->topMaterial == Tile::mycel_Id) level->setTileAndData(x + xx, y + yy - 1, z + zz, Tile::mycel_Id, 0, Tile::UPDATE_CLIENTS);
|
||||
else level->setTileAndData(x + xx, y + yy - 1, z + zz, Tile::grass_Id, 0, Tile::UPDATE_CLIENTS);
|
||||
}
|
||||
level->setTileAndData(x + xx, y + yy+101+height, z + zz, Tile::water_Id, 0, Tile::UPDATE_CLIENTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Tile::tiles[tile]->material == Material::lava)
|
||||
{
|
||||
for (int xx = 0; xx < 16; xx++)
|
||||
{
|
||||
for (int zz = 0; zz < 16; zz++)
|
||||
{
|
||||
for (int yy = 0; yy < 8; yy++)
|
||||
{
|
||||
bool check = !grid[((xx) * 16 + (zz)) * 8 + (yy)] && (
|
||||
(xx < 15 && grid[(((xx + 1) * 16 + (zz)) * 8 + (yy))])
|
||||
|| (xx > 0 && grid[(((xx - 1) * 16 + (zz)) * 8 + (yy))])
|
||||
|| (zz < 15 && grid[(((xx) * 16 + (zz + 1)) * 8 + (yy))])
|
||||
|| (zz > 0 && grid[(((xx) * 16 + (zz - 1)) * 8 + (yy))])
|
||||
|| (yy < 7 && grid[(((xx) * 16 + (zz)) * 8 + (yy + 1))])
|
||||
|| (yy > 0 && grid[(((xx) * 16 + (zz)) * 8 + (yy - 1))]));
|
||||
|
||||
if (check)
|
||||
{
|
||||
if ((yy<4 || random->nextInt(2)!=0) && level->getMaterial(x + xx, y + yy, z + zz)->isSolid())
|
||||
{
|
||||
level->setTileAndData(x + xx, y + yy, z + zz, Tile::stone_Id, 0, Tile::UPDATE_CLIENTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 4J - brought forward from 1.8.2
|
||||
if (Tile::tiles[tile]->material == Material::water)
|
||||
{
|
||||
for (int xx = 0; xx < 16; xx++)
|
||||
{
|
||||
for (int zz = 0; zz < 16; zz++)
|
||||
{
|
||||
int yy = 4;
|
||||
if (level->shouldFreezeIgnoreNeighbors(x + xx, y + yy, z + zz)) level->setTileAndData(x + xx, y + yy, z + zz, Tile::ice_Id, 0, Tile::UPDATE_CLIENTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -11,10 +11,10 @@ const unsigned int LeafTile::LEAF_NAMES[LEAF_NAMES_LENGTH] = { IDS_TILE_LEAVES_O
|
|||
IDS_TILE_LEAVES_SPRUCE,
|
||||
IDS_TILE_LEAVES_BIRCH,
|
||||
IDS_TILE_LEAVES_JUNGLE,
|
||||
IDS_TILE_LEAVES_OAK,
|
||||
IDS_TILE_LEAVES_JUNGLE,
|
||||
};
|
||||
|
||||
const wstring LeafTile::TEXTURES[2][5] = { {L"leaves", L"leaves_spruce", L"leaves", L"leaves_jungle", L"alpha_leaves"}, {L"leaves_opaque", L"leaves_spruce_opaque", L"leaves_opaque", L"leaves_jungle_opaque", L"alpha_leaves_opaque"},};
|
||||
const wstring LeafTile::TEXTURES[2][5] = { {L"leaves", L"leaves_spruce", L"leaves", L"leaves_jungle", L"leaves_alpha"}, {L"leaves_opaque", L"leaves_spruce_opaque", L"leaves_opaque", L"leaves_jungle_opaque", L"leaves_alpha_opaque"},};
|
||||
|
||||
LeafTile::LeafTile(int id) : TransparentTile(id, Material::leaves, false, isSolidRender())
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue