the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#include "stdafx.h"
2#include "net.minecraft.world.h"
3#include "RailTile.h"
4
5RailTile::RailTile(int id) : BaseRailTile(id, false)
6{
7}
8
9Icon *RailTile::getTexture(int face, int data)
10{
11 if (data >= 6)
12 {
13 return iconTurn;
14 }
15 else
16 {
17 return icon;
18 }
19}
20
21void RailTile::registerIcons(IconRegister *iconRegister)
22{
23 BaseRailTile::registerIcons(iconRegister);
24 iconTurn = iconRegister->registerIcon(getIconName() + L"_turned");
25}
26
27void RailTile::updateState(Level *level, int x, int y, int z, int data, int dir, int type)
28{
29 if (type > 0 && Tile::tiles[type]->isSignalSource())
30 {
31 if (Rail(level, x, y, z).countPotentialConnections() == 3)
32 {
33 updateDir(level, x, y, z, false);
34 }
35 }
36}