mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
62 lines
1.4 KiB
C++
62 lines
1.4 KiB
C++
#include "stdafx.h"
|
|
#include "net.minecraft.world.level.h"
|
|
#include "net.minecraft.world.phys.h"
|
|
#include "LightSourceTile.h"
|
|
|
|
LightSourceTile::LightSourceTile(int id)
|
|
: Tile(id, Material::decoration, /*isSolidRender=*/false)
|
|
{
|
|
setLightEmission(1.0f);
|
|
setDestroyTime(0.0f);
|
|
}
|
|
|
|
bool LightSourceTile::isSolidRender(bool isServerLevel)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
bool LightSourceTile::isCubeShaped()
|
|
{
|
|
return false;
|
|
}
|
|
|
|
int LightSourceTile::getRenderShape()
|
|
{
|
|
return Tile::SHAPE_INVISIBLE;
|
|
}
|
|
|
|
AABB* LightSourceTile::getAABB(Level* level, int x, int y, int z)
|
|
{
|
|
return nullptr; // íåò ôèçè÷åñêîé êîëëèçèè
|
|
}
|
|
|
|
AABB* LightSourceTile::getTileAABB(Level* level, int x, int y, int z)
|
|
{
|
|
return nullptr; // íåò ðàìêè âûäåëåíèÿ
|
|
}
|
|
|
|
HitResult* LightSourceTile::clip(Level* level, int x, int y, int z, Vec3* a, Vec3* b)
|
|
{
|
|
return nullptr; // ëó÷ ïðîõîäèò ñêâîçü áëîê, ïðèöåë íå ðåàãèðóåò
|
|
}
|
|
|
|
float LightSourceTile::getDestroyProgress(shared_ptr<Player> player, Level* level, int x, int y, int z)
|
|
{
|
|
return 0.0f; // ïðîãðåññ ðàçðóøåíèÿ âñåãäà 0 — ñëîìàòü íåâîçìîæíî
|
|
}
|
|
|
|
bool LightSourceTile::mayPick()
|
|
{
|
|
return false; // íåëüçÿ ïîäîáðàòü ñðåäíåé êíîïêîé
|
|
}
|
|
|
|
int LightSourceTile::getResourceCount(Random* random)
|
|
{
|
|
return 0; // íå âûáðàñûâàåò íè÷åãî
|
|
}
|
|
|
|
bool LightSourceTile::isPathfindable(LevelSource* level, int x, int y, int z)
|
|
{
|
|
return true; // ìîáû ïðîõîäÿò íàñêâîçü
|
|
}
|