#pragma once #include "Tile_SPU.h" class BaseRailTile_SPU : public Tile_SPU { public: static const int RAIL_DATA_BIT = 8; static const int RAIL_DIRECTION_MASK = 7; BaseRailTile_SPU(int id) : Tile_SPU(id) {} virtual bool isSolidRender(bool isServerLevel = false) { return false; } virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = NULL) // 4J added forceData, forceEntity param { int data = level->getData(x, y, z); if (data >= 2 && data <= 5) { setShape(0, 0, 0, 1, 2 / 16.0f + 0.5f, 1); } else { setShape(0, 0, 0, 1, 2 / 16.0f, 1); } } virtual int getRenderShape() { return Tile_SPU::SHAPE_RAIL; } bool isUsesDataBit() { if(id == goldenRail_Id || id == detectorRail_Id || id == activatorRail_Id) return true; return false; } };