mirror of
https://github.com/Patoke/LCERenewed.git
synced 2026-10-15 17:05:52 +00:00
feat: init
This commit is contained in:
commit
25809b8455
18807 files changed
+3944357
No files matched your search
@@ -0,0 +1,36 @@
|
||||
#include "stdafx.h"
|
||||
#include "net.minecraft.world.h"
|
||||
#include "RailTile.h"
|
||||
|
||||
RailTile::RailTile(int id) : BaseRailTile(id, false)
|
||||
{
|
||||
}
|
||||
|
||||
Icon *RailTile::getTexture(int face, int data)
|
||||
{
|
||||
if (data >= 6)
|
||||
{
|
||||
return iconTurn;
|
||||
}
|
||||
else
|
||||
{
|
||||
return icon;
|
||||
}
|
||||
}
|
||||
|
||||
void RailTile::registerIcons(IconRegister *iconRegister)
|
||||
{
|
||||
BaseRailTile::registerIcons(iconRegister);
|
||||
iconTurn = iconRegister->registerIcon(getIconName() + L"_turned");
|
||||
}
|
||||
|
||||
void RailTile::updateState(Level *level, int x, int y, int z, int data, int dir, int type)
|
||||
{
|
||||
if (type > 0 && Tile::tiles[type]->isSignalSource())
|
||||
{
|
||||
if (Rail(level, x, y, z).countPotentialConnections() == 3)
|
||||
{
|
||||
updateDir(level, x, y, z, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user