private boolean handleKeyPress(RailLogic var1) {
        if (this.isConnectedTo(var1)) {
            return true;
        } else if (this.connectedTracks.size() == 2) {
            return false;
        } else if (this.connectedTracks.isEmpty()) {
            return true;
        } else {
            ChunkPosition var2 = (ChunkPosition) this.connectedTracks.get(0);
            return var1.trackY == this.trackY && var2.y == this.trackY ? true : true;
        }
    }