Initial commit

This commit is contained in:
daoge_cmd
2026-03-01 12:16:08 +08:00
parent def8cb4153
commit b691c43c44
19437 changed files with 4363922 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
#include "stdafx.h"
#include "net.minecraft.world.level.h"
#include "net.minecraft.world.level.tile.h"
#include "net.minecraft.h"
#include "VinesFeature.h"
VinesFeature::VinesFeature()
{
}
bool VinesFeature::place(Level *level, Random *random, int x, int y, int z)
{
int ox = x;
int oz = z;
while (y < 128)
{
if (level->isEmptyTile(x, y, z))
{
for (int face = Facing::NORTH; face <= Facing::EAST; face++)
{
if (Tile::vine->mayPlace(level, x, y, z, face))
{
level->setTileAndDataNoUpdate(x, y, z, Tile::vine_Id, 1 << Direction::FACING_DIRECTION[Facing::OPPOSITE_FACING[face]]);
break;
}
}
}
else
{
x = ox + random->nextInt(4) - random->nextInt(4);
z = oz + random->nextInt(4) - random->nextInt(4);
}
y++;
}
return true;
}